diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index e7c01608d3..dd41a5f71d 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -1147,7 +1147,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, bool resolve_path_as_vfs_path = false; - const bool from_dev_flash = IsPathInsideDir(m_path, g_cfg_vfs.get_dev_flash()); + const bool from_dev_flash = IsPathInsideDir(m_path, g_cfg_vfs.get_dev_flash()); std::string savestate_build_version; std::string savestate_creation_date; diff --git a/rpcs3/rpcs3qt/gs_frame.cpp b/rpcs3/rpcs3qt/gs_frame.cpp index f2e6e32b08..5a9da7dad6 100644 --- a/rpcs3/rpcs3qt/gs_frame.cpp +++ b/rpcs3/rpcs3qt/gs_frame.cpp @@ -73,6 +73,7 @@ gs_frame::gs_frame(QScreen* screen, const QRect& geometry, const QIcon& appIcon, , m_initial_geometry(geometry) , m_gui_settings(std::move(gui_settings)) , m_start_games_fullscreen(force_fullscreen) + , m_renderer(g_cfg.video.renderer) { load_gui_settings(); diff --git a/rpcs3/rpcs3qt/gs_frame.h b/rpcs3/rpcs3qt/gs_frame.h index 07f3527d61..8d6316bd88 100644 --- a/rpcs3/rpcs3qt/gs_frame.h +++ b/rpcs3/rpcs3qt/gs_frame.h @@ -15,6 +15,7 @@ #include class gui_settings; +enum class video_renderer; class gs_frame : public QWindow, public GSFrameBase { @@ -53,6 +54,8 @@ public: explicit gs_frame(QScreen* screen, const QRect& geometry, const QIcon& appIcon, std::shared_ptr gui_settings, bool force_fullscreen); ~gs_frame(); + video_renderer renderer() const { return m_renderer; }; + void ignore_stop_events() { m_ignore_stop_events = true; } draw_context_t make_context() override; @@ -79,6 +82,8 @@ public: void take_screenshot(std::vector data, u32 sshot_width, u32 sshot_height, bool is_bgra) override; protected: + video_renderer m_renderer; + void paintEvent(QPaintEvent *event) override; void showEvent(QShowEvent *event) override; diff --git a/rpcs3/rpcs3qt/gui_application.cpp b/rpcs3/rpcs3qt/gui_application.cpp index bacc530051..b5c2041527 100644 --- a/rpcs3/rpcs3qt/gui_application.cpp +++ b/rpcs3/rpcs3qt/gui_application.cpp @@ -356,7 +356,10 @@ std::unique_ptr gui_application::get_gs_frame() // Check if the continuous mode is enabled. We reset the mode after each use in order to ensure that it is only used when explicitly needed. const bool continuous_mode_enabled = Emu.ContinuousModeEnabled(true); - if (Emu.IsChildProcess() || continuous_mode_enabled) + // Make sure we run the same config + const bool is_same_renderer = m_game_window->renderer() == g_cfg.video.renderer; + + if (is_same_renderer && (Emu.IsChildProcess() || continuous_mode_enabled)) { gui_log.notice("gui_application: Re-using old game window (IsChildProcess=%d, ContinuousModeEnabled=%d)", Emu.IsChildProcess(), continuous_mode_enabled); @@ -367,7 +370,7 @@ std::unique_ptr gui_application::get_gs_frame() return std::unique_ptr(m_game_window); } - // Clean-up old game window. This should only happen if there was an unexpected error during boot. + // Clean-up old game window. This should only happen if the renderer changed or there was an unexpected error during boot. Emu.GetCallbacks().close_gs_frame(); }