X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fwin32%2FGenaDrive%2FMain.cpp;h=93db3cd9e6d6e5eeb86fc1e5829c0c1b60a812a9;hb=e91e5120094a2e8e1914c591453f8d49fcd89553;hp=724c454ef05a8cb33db0b2b09492914b9229730d;hpb=278922b838bb8a8569f25660f7bdcb2d271879f3;p=picodrive.git diff --git a/platform/win32/GenaDrive/Main.cpp b/platform/win32/GenaDrive/Main.cpp index 724c454..93db3cd 100644 --- a/platform/win32/GenaDrive/Main.cpp +++ b/platform/win32/GenaDrive/Main.cpp @@ -11,7 +11,7 @@ int lock_to_1_1 = 1; int MainWidth=720,MainHeight=480; static HMENU mdisplay = 0; -static unsigned char *rom_data = NULL; +static int rom_loaded = 0; static void UpdateRect() { @@ -63,10 +63,10 @@ static void LoadROM(const char *cmdpath) LoopWait=1; for (i = 0; LoopWaiting == 0 && i < 10; i++) Sleep(100); + PicoUnloadCart(); PicoCartInsert(rom_data_new, rom_size); - if (rom_data) free(rom_data); - rom_data = rom_data_new; + rom_loaded = 1; romname = rompath; LoopWait=0; } @@ -106,7 +106,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd,UINT msg,WPARAM wparam,LPARAM lparam) lock_to_1_1=0; CheckMenuItem(mdisplay, 1104, MF_UNCHECKED); } - if (rom_data != NULL) LoopWait=0; + if (rom_loaded) LoopWait=0; return 0; case 1104: lock_to_1_1=!lock_to_1_1; @@ -122,7 +122,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd,UINT msg,WPARAM wparam,LPARAM lparam) "NJ: CZ80\n" "MAME devs: YM2612 and SN76496 cores\n" "Stéphane Dallongeville: Gens code, base of Fame/C (C68K), CZ80\n" - "Tasco Deluxe: SVP RE work\n", + "Tasco Deluxe: SVP RE work\n" + "Pierpaolo Prazzoli: info about SSP16 chips\n", "About", 0); return 0; }