From bcd3c79eca66c911cf5eb9c593b63ab60e46d783 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 29 Aug 2020 00:44:27 -0400 Subject: 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. --- src/yuzu/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu/main.cpp') 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() { } GMainWindow::GMainWindow() - : input_subsystem{std::make_unique()}, + : input_subsystem{std::make_shared()}, config{std::make_unique()}, vfs{std::make_shared()}, provider{std::make_unique()} { 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); -- cgit v1.2.3