diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 81ce0c9c..92100071 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -4328,6 +4328,7 @@ void Game::deserializesettings(tinyxml2::XMLElement* dataNode, struct ScreenSett bool Game::savestats(bool sync /*= true*/) { struct ScreenSettings screen_settings; + SDL_zero(screen_settings); gameScreen.GetSettings(&screen_settings); return savestats(&screen_settings, sync); @@ -4593,6 +4594,7 @@ void Game::loadsettings(struct ScreenSettings* screen_settings) bool Game::savesettings(void) { struct ScreenSettings screen_settings; + SDL_zero(screen_settings); gameScreen.GetSettings(&screen_settings); return savesettings(&screen_settings); diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index 0e4402d8..3ef56eff 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -572,6 +572,7 @@ int main(int argc, char *argv[]) // Prioritize unlock.vvv first (2.2 and below), // but settings have been migrated to settings.vvv (2.3 and up) struct ScreenSettings screen_settings; + SDL_zero(screen_settings); ScreenSettings_default(&screen_settings); game.loadstats(&screen_settings); game.loadsettings(&screen_settings);