Save all settings immediately when closing the Settings dialog, because users tend to kill the app instead of pressing 'Quit' button

This commit is contained in:
Sergii Pylypenko
2017-01-22 23:04:13 +02:00
parent 11eb95aae9
commit 5a5f2db080

View File

@@ -187,6 +187,7 @@ struct GameOptionsWindow : Window {
{
DeleteWindowById(WC_CUSTOM_CURRENCY, 0);
if (this->reload) _switch_mode = SM_MENU;
SaveToConfig(); // save all settins immediately on Android, because users tend to kill the app instead of pressing 'Quit' button
}
/**
@@ -1931,6 +1932,11 @@ struct GameSettingsWindow : Window {
this->InvalidateData();
}
~GameSettingsWindow()
{
SaveToConfig(); // save all settins immediately on Android, because users tend to kill the app instead of pressing 'Quit' button
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
switch (widget) {