X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fuiq3%2FEngine.cpp;fp=platform%2Fuiq3%2FEngine.cpp;h=ba93c8155f5103470992cfb24e01e5500aea8d34;hb=f8af96349ea464111fbef3c6528016c3dc34cdcf;hp=ee9b6a528e4112ca543fc00eb5d36f580e7801b4;hpb=02ba8788a0a15cd76fefc777908738cc27e78e6c;p=picodrive.git diff --git a/platform/uiq3/Engine.cpp b/platform/uiq3/Engine.cpp index ee9b6a5..ba93c81 100644 --- a/platform/uiq3/Engine.cpp +++ b/platform/uiq3/Engine.cpp @@ -37,7 +37,6 @@ extern const char *actionNames[]; RSemaphore initSemaphore; RSemaphore pauseSemaphore; RSemaphore loadWaitSemaphore; -int pico_was_reset = 0; static CPicolAppView *appView = 0; @@ -65,9 +64,7 @@ TInt CPicoGameSession::Do(const TPicoServRqst what, TAny *param) case PicoMsgReset: if(rom_loaded) { - PicoReset(); - pico_was_reset = 1; - return ChangeRunState(PGS_Running); + return ChangeRunState(PGS_Reset); } return 1; @@ -182,13 +179,14 @@ TInt CPicoGameSession::loadROM(TPtrC16 *pptr) // If successful, in will enter PGS_Running state by itself. loadrom_fname = (char *)writeBuf.PtrZ(); loadrom_result = 0; + loadWaitSemaphore.Wait(1); // make sure sem is not set ret = ChangeRunState(PGS_ReloadRom); if(ret) return ret; - loadWaitSemaphore.Wait(20*1000*1000); + loadWaitSemaphore.Wait(60*1000*1000); if (loadrom_result == 0) - return PicoErrNotRom; + return PicoErrRomOpenFailed; emu_getGameName(buff); TPtrC8 buff8((TUint8*) buff); @@ -198,11 +196,9 @@ TInt CPicoGameSession::loadROM(TPtrC16 *pptr) // debug #ifdef __DEBUG_PRINT - TInt cells = User::CountAllocCells(); - TInt mem; + TInt mem, cells = User::CountAllocCells(); User::AllocSize(mem); DEBUGPRINT(_L("comm: cels=%d, size=%d KB"), cells, mem/1024); - ChangeRunState(PGS_DebugHeap, PGS_Running); #endif return 0;