sceDisplaySetBrightness small bug (not really a bug)

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

sceDisplaySetBrightness small bug (not really a bug)

Post by Torch »

When using sceDisplaySetBrightness in the XMB, suppose the screen gets dimmed due to idling, then you press a button and when the screen becomes bright, it goes back to the ORIGINAL brightness before you called sceDisplaySetBrightness instead of the value you have set.

I'm assuming its because the kernel is keeping track of the current brightness in its own variable and that variable doesn't get updated when you call sceDisplaySetBrightness. Hence when the brightness needs to be set again such as after idle, it goes back to the old value.

Is there any way to update the kernel's variable or whatever with the new value after you call sceDisplaySetBrightness?
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

What's your function?
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

Suppose current brightness is 100.
I call sceDisplaySetBrightness(50,0);
The brightness gets changed to 50.

After idling for a while, the screen gets dimmed automatically (or shutoff if longer, doesn't matter).

When I press a key, the screen goes back to 100.
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Refresh

Post by angelo »

Do a loop so that it's refreshed every 1000 milliseconds.

The screen will automaticly shutdown with sceDisplayDisable so after a couple of minutes so the battery won't die.

You could also stop the PSP from going into sleep mode with

scePowerTick();

Any help or am I giving you less than helpfull answers? I get the feeling I'm not helping!

Angelo
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

its for my hold+ plugin. the brightness will be changed by the system in any case. even after auto shut off when you turn it on again.
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)

Do you change the brightness only with sceDisplaySetBrightness?

When the psp awake from the sleep it uses the value 0,1,2,3,4 and not the real brightness value (0-100).

I think you shoul use also this when changing the brightness value (50 should be 2, I think):

Code: Select all

sceImposeSetParam(PSP_IMPOSE_BACKLIGHT_BRIGHTNESS, value);
Ciaooo
Sakya
PosX100
Posts: 98
Joined: Wed Aug 15, 2007 1:02 am

Post by PosX100 »

sakya wrote:Hi! :)

Do you change the brightness only with sceDisplaySetBrightness?

When the psp awake from the sleep it uses the value 0,1,2,3,4 and not the real brightness value (0-100).

I think you shoul use also this when changing the brightness value (50 should be 2, I think):

Code: Select all

sceImposeSetParam(PSP_IMPOSE_BACKLIGHT_BRIGHTNESS, value);
Ciaooo
Sakya
Just to add an idea for the proper value...

100(max brightness level) / 4(total values) = 25, so , we have:

Level / brightness

0: probably off?
1=> 25 (x1)
2=> 50 (x2)
3=> 75 (x3)
4=> 100 (x4)
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

That only works when the XMB is running.
Post Reply