summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/bootmanager.cpp4
-rw-r--r--src/yuzu/bootmanager.h5
-rw-r--r--src/yuzu/main.cpp4
-rw-r--r--src/yuzu/main.h2
4 files changed, 8 insertions, 7 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index f1b428bde..32b548c56 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -305,8 +305,8 @@ static Core::Frontend::EmuWindow::WindowSystemInfo GetWindowSystemInfo(QWindow*
305} 305}
306 306
307GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_, 307GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
308 InputCommon::InputSubsystem* input_subsystem_) 308 std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_)
309 : QWidget(parent), emu_thread(emu_thread_), input_subsystem{input_subsystem_} { 309 : QWidget(parent), emu_thread(emu_thread_), input_subsystem{std::move(input_subsystem_)} {
310 setWindowTitle(QStringLiteral("yuzu %1 | %2-%3") 310 setWindowTitle(QStringLiteral("yuzu %1 | %2-%3")
311 .arg(QString::fromUtf8(Common::g_build_name), 311 .arg(QString::fromUtf8(Common::g_build_name),
312 QString::fromUtf8(Common::g_scm_branch), 312 QString::fromUtf8(Common::g_scm_branch),
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index ecb3b8135..ca35cf831 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -6,6 +6,7 @@
6 6
7#include <atomic> 7#include <atomic>
8#include <condition_variable> 8#include <condition_variable>
9#include <memory>
9#include <mutex> 10#include <mutex>
10 11
11#include <QImage> 12#include <QImage>
@@ -126,7 +127,7 @@ class GRenderWindow : public QWidget, public Core::Frontend::EmuWindow {
126 127
127public: 128public:
128 explicit GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_, 129 explicit GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
129 InputCommon::InputSubsystem* input_subsystem_); 130 std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_);
130 ~GRenderWindow() override; 131 ~GRenderWindow() override;
131 132
132 // EmuWindow implementation. 133 // EmuWindow implementation.
@@ -188,7 +189,7 @@ private:
188 QStringList GetUnsupportedGLExtensions() const; 189 QStringList GetUnsupportedGLExtensions() const;
189 190
190 EmuThread* emu_thread; 191 EmuThread* emu_thread;
191 InputCommon::InputSubsystem* input_subsystem; 192 std::shared_ptr<InputCommon::InputSubsystem> input_subsystem;
192 193
193 // Main context that will be shared with all other contexts that are requested. 194 // Main context that will be shared with all other contexts that are requested.
194 // If this is used in a shared context setting, then this should not be used directly, but 195 // If this is used in a shared context setting, then this should not be used directly, but
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index cab9d680a..a1b61d119 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -187,7 +187,7 @@ static void InitializeLogging() {
187} 187}
188 188
189GMainWindow::GMainWindow() 189GMainWindow::GMainWindow()
190 : input_subsystem{std::make_unique<InputCommon::InputSubsystem>()}, 190 : input_subsystem{std::make_shared<InputCommon::InputSubsystem>()},
191 config{std::make_unique<Config>()}, vfs{std::make_shared<FileSys::RealVfsFilesystem>()}, 191 config{std::make_unique<Config>()}, vfs{std::make_shared<FileSys::RealVfsFilesystem>()},
192 provider{std::make_unique<FileSys::ManualContentProvider>()} { 192 provider{std::make_unique<FileSys::ManualContentProvider>()} {
193 InitializeLogging(); 193 InitializeLogging();
@@ -474,7 +474,7 @@ void GMainWindow::InitializeWidgets() {
474#ifdef YUZU_ENABLE_COMPATIBILITY_REPORTING 474#ifdef YUZU_ENABLE_COMPATIBILITY_REPORTING
475 ui.action_Report_Compatibility->setVisible(true); 475 ui.action_Report_Compatibility->setVisible(true);
476#endif 476#endif
477 render_window = new GRenderWindow(this, emu_thread.get(), input_subsystem.get()); 477 render_window = new GRenderWindow(this, emu_thread.get(), input_subsystem);
478 render_window->hide(); 478 render_window->hide();
479 479
480 game_list = new GameList(vfs, provider.get(), this); 480 game_list = new GameList(vfs, provider.get(), this);
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index 957f20fa8..0ce66a1ca 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -258,7 +258,7 @@ private:
258 Ui::MainWindow ui; 258 Ui::MainWindow ui;
259 259
260 std::unique_ptr<DiscordRPC::DiscordInterface> discord_rpc; 260 std::unique_ptr<DiscordRPC::DiscordInterface> discord_rpc;
261 std::unique_ptr<InputCommon::InputSubsystem> input_subsystem; 261 std::shared_ptr<InputCommon::InputSubsystem> input_subsystem;
262 262
263 GRenderWindow* render_window; 263 GRenderWindow* render_window;
264 GameList* game_list; 264 GameList* game_list;