Fix UI crash on Windows (#813)

This commit is contained in:
Exzap 2023-05-11 15:27:45 +02:00 committed by GitHub
parent dba724c4a0
commit eda4cf4b24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -875,7 +875,9 @@ void GeneralSettings2::StoreConfig()
config.fullscreen_menubar = m_fullscreen_menubar->IsChecked(); config.fullscreen_menubar = m_fullscreen_menubar->IsChecked();
config.check_update = m_auto_update->IsChecked(); config.check_update = m_auto_update->IsChecked();
config.save_screenshot = m_save_screenshot->IsChecked(); config.save_screenshot = m_save_screenshot->IsChecked();
config.feral_gamemode = m_feral_gamemode->IsChecked(); #if BOOST_OS_LINUX && defined(ENABLE_FERAL_GAMEMODE)
config.feral_gamemode = m_feral_gamemode->IsChecked();
#endif
const bool use_ps = m_permanent_storage->IsChecked(); const bool use_ps = m_permanent_storage->IsChecked();
if(use_ps) if(use_ps)
{ {
@ -1515,8 +1517,9 @@ void GeneralSettings2::ApplyConfig()
m_permanent_storage->SetValue(config.permanent_storage); m_permanent_storage->SetValue(config.permanent_storage);
m_disable_screensaver->SetValue(config.disable_screensaver); m_disable_screensaver->SetValue(config.disable_screensaver);
#if BOOST_OS_LINUX && defined(ENABLE_FERAL_GAMEMODE)
m_feral_gamemode->SetValue(config.feral_gamemode); m_feral_gamemode->SetValue(config.feral_gamemode);
#endif
// temporary workaround because feature crashes on macOS // temporary workaround because feature crashes on macOS
#if BOOST_OS_MACOS #if BOOST_OS_MACOS
m_disable_screensaver->SetValue(false); m_disable_screensaver->SetValue(false);

View File

@ -43,7 +43,9 @@ private:
wxCheckBox* m_auto_update, *m_save_screenshot; wxCheckBox* m_auto_update, *m_save_screenshot;
wxCheckBox* m_permanent_storage; wxCheckBox* m_permanent_storage;
wxCheckBox* m_disable_screensaver; wxCheckBox* m_disable_screensaver;
wxCheckBox* m_feral_gamemode; #if BOOST_OS_LINUX && defined(ENABLE_FERAL_GAMEMODE)
wxCheckBox* m_feral_gamemode;
#endif
wxListBox* m_game_paths; wxListBox* m_game_paths;
wxTextCtrl* m_mlc_path; wxTextCtrl* m_mlc_path;