mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 14:57:46 -04:00
attempt to fix PSP sleep wake
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@528 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
ac3494f42e
commit
8fc24df108
2 changed files with 10 additions and 7 deletions
|
@ -960,10 +960,10 @@ int emu_SaveLoadGame(int load, int sram)
|
||||||
}
|
}
|
||||||
else ret = -1;
|
else ret = -1;
|
||||||
if (!ret)
|
if (!ret)
|
||||||
strcpy(noticeMsg, load ? "GAME LOADED " : "GAME SAVED ");
|
strcpy(noticeMsg, load ? "GAME LOADED " : "GAME SAVED ");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcpy(noticeMsg, load ? "LOAD FAILED " : "SAVE FAILED ");
|
strcpy(noticeMsg, load ? "LOAD FAILED " : "SAVE FAILED ");
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
13
psp/psp.c
13
psp/psp.c
|
@ -276,16 +276,19 @@ void psp_resume_suspend(void)
|
||||||
SceUID fd;
|
SceUID fd;
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 30; i++) {
|
for (i = 0; i < 30; i++) {
|
||||||
fd = sceIoOpen("dummy.txt", PSP_O_WRONLY|PSP_O_APPEND, 0777);
|
fd = sceIoOpen("EBOOT.PBP", PSP_O_RDONLY, 0777);
|
||||||
if (fd != 0x80010013) break; // device not available
|
if (fd >= 0) break;
|
||||||
sceKernelDelayThread(32 * 1024);
|
sceKernelDelayThread(100 * 1024);
|
||||||
}
|
}
|
||||||
if (fd >= 0) sceIoClose(fd);
|
if (fd >= 0) sceIoClose(fd);
|
||||||
sceDisplayWaitVblankStart();
|
sceDisplayWaitVblankStart();
|
||||||
psp_unhandled_suspend = 0;
|
psp_unhandled_suspend = 0;
|
||||||
if (i < 30)
|
if (i < 30)
|
||||||
lprintf("io resumed after %i tries\n", i);
|
lprintf("io resumed after %i tries\n", i);
|
||||||
else lprintf("io resume failed\n");
|
else {
|
||||||
|
lprintf("io resume failed with %08x\n", fd);
|
||||||
|
sceKernelDelayThread(500 * 1024);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* alt logging */
|
/* alt logging */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue