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/bootmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu/bootmanager.cpp') 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* } GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_, - InputCommon::InputSubsystem* input_subsystem_) - : QWidget(parent), emu_thread(emu_thread_), input_subsystem{input_subsystem_} { + std::shared_ptr input_subsystem_) + : QWidget(parent), emu_thread(emu_thread_), input_subsystem{std::move(input_subsystem_)} { setWindowTitle(QStringLiteral("yuzu %1 | %2-%3") .arg(QString::fromUtf8(Common::g_build_name), QString::fromUtf8(Common::g_scm_branch), -- cgit v1.2.3