From: notaz Date: Sun, 6 Jul 2008 15:43:26 +0000 (+0000) Subject: attempt to fix PSP sleep wake X-Git-Tag: v1.85~434 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b1f0e25193de382c6578fcf8e5edeaa37a21555;p=picodrive.git attempt to fix PSP sleep wake git-svn-id: file:///home/notaz/opt/svn/PicoDrive@528 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/platform/common/emu.c b/platform/common/emu.c index 44e15a64..c4826731 100644 --- a/platform/common/emu.c +++ b/platform/common/emu.c @@ -960,10 +960,10 @@ int emu_SaveLoadGame(int load, int sram) } else ret = -1; if (!ret) - strcpy(noticeMsg, load ? "GAME LOADED " : "GAME SAVED "); + strcpy(noticeMsg, load ? "GAME LOADED " : "GAME SAVED "); else { - strcpy(noticeMsg, load ? "LOAD FAILED " : "SAVE FAILED "); + strcpy(noticeMsg, load ? "LOAD FAILED " : "SAVE FAILED "); ret = -1; } diff --git a/platform/psp/psp.c b/platform/psp/psp.c index 8d1134c5..fd55b6c7 100644 --- a/platform/psp/psp.c +++ b/platform/psp/psp.c @@ -276,16 +276,19 @@ void psp_resume_suspend(void) SceUID fd; int i; for (i = 0; i < 30; i++) { - fd = sceIoOpen("dummy.txt", PSP_O_WRONLY|PSP_O_APPEND, 0777); - if (fd != 0x80010013) break; // device not available - sceKernelDelayThread(32 * 1024); + fd = sceIoOpen("EBOOT.PBP", PSP_O_RDONLY, 0777); + if (fd >= 0) break; + sceKernelDelayThread(100 * 1024); } if (fd >= 0) sceIoClose(fd); sceDisplayWaitVblankStart(); psp_unhandled_suspend = 0; if (i < 30) - lprintf("io resumed after %i tries\n", i); - else lprintf("io resume failed\n"); + lprintf("io resumed after %i tries\n", i); + else { + lprintf("io resume failed with %08x\n", fd); + sceKernelDelayThread(500 * 1024); + } } /* alt logging */