mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 14:48:17 -05:00
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.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user