Load key bind defaults before loading the config, fixes saved key binds across emulator closures and reopenings.
This commit is contained in:
15
src/86box.c
15
src/86box.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user