| View previous topic :: View next topic |
| Author |
Message |
n0w
Joined: 16 Feb 2010 Posts: 4 Location: Spain
|
Posted: Wed Feb 17, 2010 2:38 am Post subject: sceDisplayEnable & sceDisplaySetBrightness in User Mode |
|
|
Hi!
I am writing a program that needs to keep the screen always turned on, but in a few seconds, if you don't press any button, psp's power management turns the brightness low and finally it turns the whole screen off.
I need to prevent psp doing this so i was thinking about something like:
| Code: |
sceDisplayEnable();
sceDisplaySetBrightness(100, 0);
sceKernelDelayThread(400000);
|
at the main loop of my program in order to prevent lcd's backlight turning off.
The problem is (i think), that i can only do these calls from a user-level thread, and as far I know, sceDisplayEnable & SetBrightness functions can only be called from a kernel-level thread...
Any idea?
Thanks for reading ;-) _________________ "The only people who never fail are those who never try."
http://www.n0w-dev.net/ |
|
| Back to top |
|
 |
unsigned int
Joined: 13 Aug 2009 Posts: 22
|
Posted: Wed Feb 17, 2010 5:00 am Post subject: |
|
|
Just use
| Code: | scePowerTick(PSP_POWER_TICK_DISPLAY);
|
somewhere in your game loop to prevent the PSP from turning off the display. |
|
| Back to top |
|
 |
n0w
Joined: 16 Feb 2010 Posts: 4 Location: Spain
|
Posted: Wed Feb 17, 2010 5:06 am Post subject: |
|
|
Wow!! I wasn't know about that function... Do you know some site with something like a well documented sce api?
I was looking for information but i only have founded info about gu programming...
Thanks :) _________________ "The only people who never fail are those who never try."
http://www.n0w-dev.net/ |
|
| Back to top |
|
 |
unsigned int
Joined: 13 Aug 2009 Posts: 22
|
Posted: Wed Feb 17, 2010 5:15 am Post subject: |
|
|
| There should be documentation about everything included in your PSPSDK installation (/usr/local/pspdev/psp/sdk/doc/ or c:\pspsdk\doc\pspsdk) or online http://psp.jim.sh/pspsdk-doc/ . |
|
| Back to top |
|
 |
n0w
Joined: 16 Feb 2010 Posts: 4 Location: Spain
|
Posted: Wed Feb 17, 2010 5:46 am Post subject: |
|
|
Ok man thanks!! ^^ _________________ "The only people who never fail are those who never try."
http://www.n0w-dev.net/ |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Sun Feb 21, 2010 7:15 am Post subject: |
|
|
PSP_POWER_TICK_DISPLAY
Will only reset the screen dim/off timer. The suspend timer will still fire. |
|
| Back to top |
|
 |
carl0sgs
Joined: 10 Dec 2009 Posts: 41
|
Posted: Sun Feb 21, 2010 9:36 am Post subject: |
|
|
I use scePowerTick(0); and -i think- it prevents the psp from suspending and everything (like if you pressed a button.
Cheers |
|
| Back to top |
|
 |
|