From dae3836433dacab74123bb24f85e500619a3f348 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Fri, 27 Apr 2018 20:08:47 -0700 Subject: Only save config file if something has changed. Re-initialize audio and video with new settings if config has changed --- blastem.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'blastem.c') diff --git a/blastem.c b/blastem.c index a5fbcfe..48172b2 100644 --- a/blastem.c +++ b/blastem.c @@ -277,6 +277,11 @@ void setup_saves(system_media *media, rom_info *info, system_header *context) } } +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 @@ void init_system_with_media(char *path, system_type force_stype) 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 @@ int main(int argc, char ** argv) } } - atexit(save_config); - #ifndef DISABLE_NUKLEAR if (use_nuklear) { blastem_nuklear_init(!menu); -- cgit v1.2.3