fix patch support
authornotaz <notasas@gmail.com>
Sat, 18 Sep 2010 17:57:34 +0000 (17:57 +0000)
committernotaz <notasas@gmail.com>
Sat, 18 Sep 2010 17:57:34 +0000 (17:57 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@899 be3aeb3a-fb24-0410-a615-afba39da0efa

platform/common/emu.c

index 822d7aa..1e60925 100644 (file)
@@ -497,11 +497,13 @@ int emu_reload_rom(char *rom_fname)
 \r
        get_ext(rom_fname, ext);\r
 \r
-       // check for movie file\r
+       // early cleanup\r
+       PicoPatchUnload();\r
        if (movie_data) {\r
                free(movie_data);\r
                movie_data = 0;\r
        }\r
+\r
        if (!strcmp(ext, ".gmv"))\r
        {\r
                // check for both gmv and rom\r
@@ -558,7 +560,6 @@ int emu_reload_rom(char *rom_fname)
        }\r
 \r
        shutdown_MCD();\r
-       PicoPatchUnload();\r
        PicoCartUnload();\r
        rom_loaded = 0;\r
 \r