Search found 5 matches

by john_he
Fri Jan 08, 2010 7:10 pm
Forum: PSP Development
Topic: Putting my hw to sleep
Replies: 16
Views: 9606

you can probably go down to 10, but if that 20 doesn't slow the things down too much, of course you can leave it like that. 20 slows down just a bit, in my situation. Actually I tried 0 and it still worked, though I don't know the mechanism. I tried reopening files in the callback, without semaphor...
by john_he
Wed Jan 06, 2010 7:52 pm
Forum: PSP Development
Topic: Putting my hw to sleep
Replies: 16
Views: 9606

Thanks to Alberto's suggestions, I solved the problem by adding the following line to the main loop. sceKernelDelayThread(20); Now the remaining task is reopen file descriptors. Is it suitable to do it right in the power callback like this? int power_callback(int unknown, int...
by john_he
Wed Jan 06, 2010 3:56 pm
Forum: PSP Development
Topic: Putting my hw to sleep
Replies: 16
Views: 9606

@Alberto: So the main reason is when the hardware suspend and trigger the callback, which runs in the callback thread, the main thread breaks it's execution and then can't go into suspending. Is that right? The program does have a main loop, that's the cpu emulation core. I just want to know in what...
by john_he
Wed Jan 06, 2010 3:35 am
Forum: PSP Development
Topic: Putting my hw to sleep
Replies: 16
Views: 9606

Actually it's the PSP port of the PC-98 emulator NP2. Here is the callback and the main function: (commented in Japanese) static void exit_proc(void) { //廔椆張棟 taskmng_exit(); /* main thread偺儖&a...
by john_he
Wed Jan 06, 2010 1:53 am
Forum: PSP Development
Topic: Putting my hw to sleep
Replies: 16
Views: 9606

Hello.
I have exactly the same problem as Alberto do. Can anybody figure out the reason and solution?