Save settings before leaving the settings menu
This commit is contained in:
parent
32d397eb2a
commit
df830f6495
8 changed files with 23 additions and 10 deletions
|
|
@ -302,7 +302,6 @@ void OptionAudioChanged()
|
|||
|
||||
/** Game options */
|
||||
Options sgOptions;
|
||||
bool sbWasOptionsLoaded = false;
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
bool HardwareCursorSupported()
|
||||
|
|
@ -354,12 +353,13 @@ void LoadOptions()
|
|||
|
||||
if (demo::IsRunning())
|
||||
demo::OverrideOptions();
|
||||
|
||||
sbWasOptionsLoaded = true;
|
||||
}
|
||||
|
||||
void SaveOptions()
|
||||
{
|
||||
if (demo::IsRunning())
|
||||
return;
|
||||
|
||||
for (OptionCategoryBase *pCategory : sgOptions.GetCategories()) {
|
||||
for (OptionEntryBase *pEntry : pCategory->GetEntries()) {
|
||||
pEntry->SaveToIni(pCategory->GetKey());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue