Merge pull request #432 from thesourcehim/master

Update menu and config upon save type change
This commit is contained in:
zeromus 2021-02-27 14:43:22 -05:00 committed by GitHub
commit 600d159427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -65,6 +65,7 @@ OPT(multisampling, bool, false, Config, OpenGLMultisampling)
OPT(multisamplingSize, int, 0, Config, OpenGLMultisamplingSize)
OPT(command_line_overriding_firmware_language, bool, false, Config, CommandLineOverridingFirmwareLanguage)
OPT(firmware_language, int, 1, Config, FirmwareLanguage)
OPT(savetype, int, 0, Config, SaveType)
/* Audio */
OPT(audio_enabled, bool, true, Audio, Enabled)

View File

@ -2652,6 +2652,8 @@ static void changesavetype(GSimpleAction *action, GVariant *parameter, gpointer
else if (strcmp(string, "flash-4m") == 0)
savetype = 6;
backup_setManualBackupType(savetype);
config.savetype=savetype;
g_simple_action_set_state(action, parameter);
}
static void desmume_gtk_menu_tool_layers(GtkApplication *app)
@ -3027,6 +3029,7 @@ common_gtk_main(GApplication *app, gpointer user_data)
desmume_gtk_menu_view_hud(GTK_APPLICATION(app));
#endif
desmume_gtk_menu_tools(GTK_APPLICATION(app));
my_config->savetype=config.savetype;
std::string string;
switch (my_config->savetype) {
case 0: