Load key bind defaults before loading the config, fixes saved key binds across emulator closures and reopenings.

This commit is contained in:
OBattler
2025-04-22 22:38:16 +02:00
parent 749f6f3205
commit 406588293c
2 changed files with 32 additions and 37 deletions

View File

@@ -1000,6 +1000,13 @@ usage:
zip_global_init();
mo_global_init();
/* Initialize the keyboard accelerator list with default values */
for (int x = 0; x < NUM_ACCELS; x++) {
strcpy(acc_keys[x].name, def_acc_keys[x].name);
strcpy(acc_keys[x].desc, def_acc_keys[x].desc);
strcpy(acc_keys[x].seq, def_acc_keys[x].seq);
}
/* Load the configuration file. */
config_load();
@@ -1030,14 +1037,6 @@ usage:
gdbstub_init();
// Initialize the keyboard accelerator list with default values
for(int x=0;x<NUM_ACCELS;x++) {
strcpy(acc_keys[x].name, def_acc_keys[x].name);
strcpy(acc_keys[x].desc, def_acc_keys[x].desc);
strcpy(acc_keys[x].seq, def_acc_keys[x].seq);
}
/* All good! */
return 1;
}