@@ -3666,7 +3666,7 @@ bool command_event(enum event_command cmd, void *data)
36663666 input_remapping_set_defaults (true);
36673667 }
36683668 else
3669- input_remapping_restore_global_config (true);
3669+ input_remapping_restore_global_config (true, false );
36703670
36713671#ifdef HAVE_CONFIGFILE
36723672 if (runloop_st -> flags & RUNLOOP_FLAG_OVERRIDES_ACTIVE )
@@ -7578,7 +7578,7 @@ bool retroarch_main_init(int argc, char *argv[])
75787578 input_remapping_set_defaults (true);
75797579 }
75807580 else
7581- input_remapping_restore_global_config (true);
7581+ input_remapping_restore_global_config (true, false );
75827582
75837583#ifdef HAVE_CONFIGFILE
75847584 /* Reload the original config */
@@ -8155,15 +8155,6 @@ bool retroarch_main_quit(void)
81558155 }
81568156 if (!(runloop_st -> flags & RUNLOOP_FLAG_SHUTDOWN_INITIATED ))
81578157 {
8158- /* Save configs before quitting
8159- * as for UWP depending on `OnSuspending` is not important as we can call it directly here
8160- * specifically we need to get width,height which requires UI thread and it will not be available on exit
8161- */
8162- #if defined(HAVE_DYNAMIC )
8163- if (config_save_on_exit )
8164- command_event (CMD_EVENT_MENU_SAVE_CURRENT_CONFIG , NULL );
8165- #endif
8166-
81678158 if (settings -> bools .savestate_auto_save &&
81688159 runloop_st -> current_core_type != CORE_TYPE_DUMMY )
81698160 command_event_save_auto_state ();
@@ -8183,7 +8174,7 @@ bool retroarch_main_quit(void)
81838174 input_remapping_set_defaults (true);
81848175 }
81858176 else
8186- input_remapping_restore_global_config (true);
8177+ input_remapping_restore_global_config (true, false );
81878178
81888179#ifdef HAVE_CONFIGFILE
81898180 if (runloop_st -> flags & RUNLOOP_FLAG_OVERRIDES_ACTIVE )
@@ -8192,6 +8183,16 @@ bool retroarch_main_quit(void)
81928183 config_unload_override ();
81938184 }
81948185#endif
8186+
8187+ /* Save configs before quitting
8188+ * as for UWP depending on `OnSuspending` is not important as we can call it directly here
8189+ * specifically we need to get width,height which requires UI thread and it will not be available on exit
8190+ */
8191+ #if defined(HAVE_DYNAMIC )
8192+ if (config_save_on_exit )
8193+ command_event (CMD_EVENT_MENU_SAVE_CURRENT_CONFIG , NULL );
8194+ #endif
8195+
81958196#if defined(HAVE_CG ) || defined(HAVE_GLSL ) || defined(HAVE_SLANG ) || defined(HAVE_HLSL )
81968197 runloop_st -> runtime_shader_preset_path [0 ] = '\0' ;
81978198#endif
0 commit comments