Do not reset emulator on file load (no ram clear)
authorHugo Villeneuve <hugo@hugovil.com>
Thu, 24 Oct 2013 03:32:00 +0000 (23:32 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 6 Nov 2013 02:50:18 +0000 (21:50 -0500)
Reset only when loading first file at application startup.

src/emugtk.c

index 9ade2cd..06741ff 100644 (file)
@@ -471,7 +471,9 @@ emugtk_new_file(char *file)
 
        LoadHexFile(file);
 
-       emugtk_Reset(); /* Use app-config->clear_ram_on_file_load */
+       if (cfg->clear_ram_on_file_load)
+               emugtk_Reset();
+
        emugtk_UpdateDisplay();
 }
 
@@ -489,8 +491,8 @@ main(int argc, char **argv)
 
        if (options.filename != NULL)
                LoadHexFile(options.filename);
-       else
-               cpu8051_Reset();
+
+       cpu8051_Reset();
 
        while (restart_gui == true) {
                log_info("Init GUI");