diff blastem.c @ 1573:a051d8ee4528

Only save config file if something has changed. Re-initialize audio and video with new settings if config has changed
author Michael Pavone <pavone@retrodev.com>
date Fri, 27 Apr 2018 20:08:47 -0700
parents b525491b4e5b
children 7121daaa48c2
line wrap: on
line diff
--- a/blastem.c	Tue Apr 24 20:31:18 2018 -0700
+++ b/blastem.c	Fri Apr 27 20:08:47 2018 -0700
@@ -277,6 +277,11 @@
 	}
 }
 
+void apply_updated_config(void)
+{
+	render_config_updated();
+}
+
 static void on_drag_drop(const char *filename)
 {
 	if (current_system->next_rom) {
@@ -377,11 +382,6 @@
 	update_title(info.name);
 }
 
-static void save_config(void)
-{
-	persist_config(config);
-}
-
 int main(int argc, char ** argv)
 {
 	set_exe_str(argv[0]);
@@ -617,8 +617,6 @@
 		}
 	}
 	
-	atexit(save_config);
-	
 #ifndef DISABLE_NUKLEAR
 	if (use_nuklear) {
 		blastem_nuklear_init(!menu);