aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-29 00:44:27 -0400
committerLioncash <mathew1800@gmail.com>2020-08-29 00:58:11 -0400
commitbcd3c79eca66c911cf5eb9c593b63ab60e46d783 (patch)
tree2ee39ab0bdbaaae69bf82ce725cf06fb77cea171 /src/yuzu/main.cpp
parent57d9ef5a899dd32be7bae5aaeb53bc7cd2766a78 (diff)
yuzu/main: Amend lifetime issues with InputSubsystem
Due to the way Qt performs destruction of parent/child widgets, we need to make the lifetime of the input subsystem shared across the main window and the render window.
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index cab9d680a3..a1b61d119c 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -187,7 +187,7 @@ static void InitializeLogging() {
}
GMainWindow::GMainWindow()
- : input_subsystem{std::make_unique<InputCommon::InputSubsystem>()},
+ : input_subsystem{std::make_shared<InputCommon::InputSubsystem>()},
config{std::make_unique<Config>()}, vfs{std::make_shared<FileSys::RealVfsFilesystem>()},
provider{std::make_unique<FileSys::ManualContentProvider>()} {
InitializeLogging();
@@ -474,7 +474,7 @@ void GMainWindow::InitializeWidgets() {
#ifdef YUZU_ENABLE_COMPATIBILITY_REPORTING
ui.action_Report_Compatibility->setVisible(true);
#endif
- render_window = new GRenderWindow(this, emu_thread.get(), input_subsystem.get());
+ render_window = new GRenderWindow(this, emu_thread.get(), input_subsystem);
render_window->hide();
game_list = new GameList(vfs, provider.get(), this);