1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-22 17:35:29 +00:00

Fix premature .ini saving leading to missing bindings

This commit is contained in:
erorcun 2021-08-15 03:29:49 +03:00
parent df89e5091e
commit 747ae04279
3 changed files with 12 additions and 11 deletions

View file

@ -3812,9 +3812,6 @@ CMenuManager::LoadSettings()
if (LoadINISettings()) {
LoadINIControllerSettings();
}
// if no re3.ini, create it, or update it with new values
SaveINISettings();
SaveINIControllerSettings();
#endif
m_PrefsVsync = m_PrefsVsyncDisp;

View file

@ -1935,10 +1935,12 @@ main(int argc, char *argv[])
#ifdef LOAD_INI_SETTINGS
LoadINIControllerSettings();
if (connectedPadButtons != 0) {
ControlsManager.InitDefaultControlConfigJoyPad(connectedPadButtons);
SaveINIControllerSettings();
}
if (connectedPadButtons != 0)
ControlsManager.InitDefaultControlConfigJoyPad(connectedPadButtons); // add (connected-saved) amount of new button assignments on top of ours
// these have 2 purposes: creating .ini at the start, and adding newly introduced settings to old .ini at the start
SaveINISettings();
SaveINIControllerSettings();
#endif
}

View file

@ -2181,10 +2181,12 @@ WinMain(HINSTANCE instance,
#ifdef LOAD_INI_SETTINGS
LoadINIControllerSettings();
if (connectedPadButtons != 0) {
ControlsManager.InitDefaultControlConfigJoyPad(connectedPadButtons);
SaveINIControllerSettings();
}
if (connectedPadButtons != 0)
ControlsManager.InitDefaultControlConfigJoyPad(connectedPadButtons); // add (connected-saved) amount of new button assignments on top of ours
// these have 2 purposes: creating .ini at the start, and adding newly introduced settings to old .ini at the start
SaveINISettings();
SaveINIControllerSettings();
#endif
}