Skip to content

Commit

Permalink
Fix UI crash on Windows (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
Exzap committed May 11, 2023
1 parent dba724c commit eda4cf4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/gui/GeneralSettings2.cpp
Expand Up @@ -875,7 +875,9 @@ void GeneralSettings2::StoreConfig()
config.fullscreen_menubar = m_fullscreen_menubar->IsChecked();
config.check_update = m_auto_update->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();
if(use_ps)
{
Expand Down Expand Up @@ -1515,8 +1517,9 @@ void GeneralSettings2::ApplyConfig()

m_permanent_storage->SetValue(config.permanent_storage);
m_disable_screensaver->SetValue(config.disable_screensaver);

#if BOOST_OS_LINUX && defined(ENABLE_FERAL_GAMEMODE)
m_feral_gamemode->SetValue(config.feral_gamemode);
#endif
// temporary workaround because feature crashes on macOS
#if BOOST_OS_MACOS
m_disable_screensaver->SetValue(false);
Expand Down
4 changes: 3 additions & 1 deletion src/gui/GeneralSettings2.h
Expand Up @@ -43,7 +43,9 @@ class GeneralSettings2 : public wxDialog
wxCheckBox* m_auto_update, *m_save_screenshot;
wxCheckBox* m_permanent_storage;
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;
wxTextCtrl* m_mlc_path;

Expand Down

0 comments on commit eda4cf4

Please sign in to comment.