summaryrefslogtreecommitdiff
path: root/src/yuzu
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu')
-rw-r--r--src/yuzu/applets/web_browser.cpp18
-rw-r--r--src/yuzu/applets/web_browser.h10
-rw-r--r--src/yuzu/main.h5
3 files changed, 21 insertions, 12 deletions
diff --git a/src/yuzu/applets/web_browser.cpp b/src/yuzu/applets/web_browser.cpp
index e1a34bb5f..c59b7ade1 100644
--- a/src/yuzu/applets/web_browser.cpp
+++ b/src/yuzu/applets/web_browser.cpp
@@ -10,15 +10,17 @@
#include "yuzu/applets/web_browser.h"
#include "yuzu/main.h"
+#ifdef YUZU_USE_QT_WEB_ENGINE
+
constexpr char NX_SHIM_INJECT_SCRIPT[] = R"(
window.nx = {};
window.nx.playReport = {};
window.nx.playReport.setCounterSetIdentifier = function () {
- console.log("nx.footer.setCounterSetIdentifier called - unimplemented");
+ console.log("nx.playReport.setCounterSetIdentifier called - unimplemented");
};
window.nx.playReport.incrementCounter = function () {
- console.log("nx.footer.incrementCounter called - unimplemented");
+ console.log("nx.playReport.incrementCounter called - unimplemented");
};
window.nx.footer = {};
@@ -56,6 +58,12 @@ constexpr char NX_SHIM_INJECT_SCRIPT[] = R"(
};
)";
+QString GetNXShimInjectionScript() {
+ return QString::fromStdString(NX_SHIM_INJECT_SCRIPT);
+}
+
+NXInputWebEngineView::NXInputWebEngineView(QWidget* parent) : QWebEngineView(parent) {}
+
void NXInputWebEngineView::keyPressEvent(QKeyEvent* event) {
parent()->event(event);
}
@@ -64,11 +72,7 @@ void NXInputWebEngineView::keyReleaseEvent(QKeyEvent* event) {
parent()->event(event);
}
-QString GetNXShimInjectionScript() {
- return QString::fromStdString(NX_SHIM_INJECT_SCRIPT);
-}
-
-NXInputWebEngineView::NXInputWebEngineView(QWidget* parent) : QWebEngineView(parent) {}
+#endif
QtWebBrowser::QtWebBrowser(GMainWindow& main_window) {
connect(this, &QtWebBrowser::MainWindowOpenPage, &main_window, &GMainWindow::WebBrowserOpenPage,
diff --git a/src/yuzu/applets/web_browser.h b/src/yuzu/applets/web_browser.h
index 74f6698be..bba273767 100644
--- a/src/yuzu/applets/web_browser.h
+++ b/src/yuzu/applets/web_browser.h
@@ -6,22 +6,30 @@
#include <functional>
#include <QObject>
+
+#ifdef YUZU_USE_QT_WEB_ENGINE
#include <QWebEngineView>
+#endif
+
#include "core/frontend/applets/web_browser.h"
class GMainWindow;
+#ifdef YUZU_USE_QT_WEB_ENGINE
+
QString GetNXShimInjectionScript();
class NXInputWebEngineView : public QWebEngineView {
public:
- NXInputWebEngineView(QWidget* parent = nullptr);
+ explicit NXInputWebEngineView(QWidget* parent = nullptr);
protected:
void keyPressEvent(QKeyEvent* event) override;
void keyReleaseEvent(QKeyEvent* event) override;
};
+#endif
+
class QtWebBrowser final : public QObject, public Core::Frontend::WebBrowserApplet {
Q_OBJECT
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index 3af5fa1f3..8a0485de9 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -13,6 +13,7 @@
#include "common/common_types.h"
#include "core/core.h"
+#include "core/hle/service/acc/profile_manager.h"
#include "ui_main.h"
#include "yuzu/compatibility_list.h"
#include "yuzu/hotkeys.h"
@@ -39,10 +40,6 @@ class RegisteredCacheUnion;
class VfsFilesystem;
} // namespace FileSys
-namespace Service::Account {
-struct UUID;
-} // namespace Service::Account
-
namespace Tegra {
class DebugContext;
}