forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sceDisplaySetBrightness small bug (not really a bug)

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Aug 31, 2008 1:42 am    Post subject: sceDisplaySetBrightness small bug (not really a bug) Reply with quote

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?
Back to top
View user's profile Send private message
angelo



Joined: 29 Aug 2007
Posts: 168

PostPosted: Sun Aug 31, 2008 1:50 am    Post subject: Reply with quote

What's your function?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Aug 31, 2008 1:54 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
angelo



Joined: 29 Aug 2007
Posts: 168

PostPosted: Sun Aug 31, 2008 2:10 am    Post subject: Refresh Reply with quote

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
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Aug 31, 2008 4:08 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
sakya



Joined: 28 Apr 2006
Posts: 190

PostPosted: Sun Aug 31, 2008 6:50 pm    Post subject: Reply with quote

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:
sceImposeSetParam(PSP_IMPOSE_BACKLIGHT_BRIGHTNESS, value);


Ciaooo
Sakya
Back to top
View user's profile Send private message Visit poster's website
PosX100



Joined: 15 Aug 2007
Posts: 98

PostPosted: Sun Aug 31, 2008 11:00 pm    Post subject: Reply with quote

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:
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)
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Aug 31, 2008 11:25 pm    Post subject: Reply with quote

That only works when the XMB is running.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group