diff --git a/src/duckstation-qt/qthost.cpp b/src/duckstation-qt/qthost.cpp index 349e01568..23596a17d 100644 --- a/src/duckstation-qt/qthost.cpp +++ b/src/duckstation-qt/qthost.cpp @@ -327,9 +327,9 @@ void EmuThread::loadSettings(SettingsInterface& si) // } -void EmuThread::setInitialState() +void EmuThread::setInitialState(std::optional override_fullscreen) { - m_is_fullscreen = Host::GetBaseBoolSettingValue("Main", "StartFullscreen", false); + m_is_fullscreen = override_fullscreen.value_or(Host::GetBaseBoolSettingValue("Main", "StartFullscreen", false)); m_is_rendering_to_main = shouldRenderToMain(); m_is_surfaceless = false; } @@ -451,10 +451,8 @@ void EmuThread::startFullscreenUI() // we want settings loaded so we choose the correct renderer // this also sorts out input sources. System::LoadSettings(false); - setInitialState(); + setInitialState(s_start_fullscreen_ui_fullscreen ? std::optional(true) : std::optional()); m_run_fullscreen_ui = true; - if (s_start_fullscreen_ui_fullscreen) - m_is_fullscreen = true; if (!acquireHostDisplay(Settings::GetRenderAPIForRenderer(g_settings.gpu_renderer))) { @@ -500,7 +498,7 @@ void EmuThread::bootSystem(std::shared_ptr params) return; } - setInitialState(); + setInitialState(params->override_fullscreen); if (!System::BootSystem(std::move(*params))) return; diff --git a/src/duckstation-qt/qthost.h b/src/duckstation-qt/qthost.h index 6b770653b..cd0bac444 100644 --- a/src/duckstation-qt/qthost.h +++ b/src/duckstation-qt/qthost.h @@ -105,7 +105,6 @@ public: bool shouldRenderToMain() const; void loadSettings(SettingsInterface& si); - void setInitialState(); void checkForSettingsChanges(const Settings& old_settings); void bootOrLoadState(std::string path); @@ -208,6 +207,7 @@ private: void createBackgroundControllerPollTimer(); void destroyBackgroundControllerPollTimer(); + void setInitialState(std::optional override_fullscreen); void updateDisplayState(); QThread* m_ui_thread;