Jump to content

New: There is no API for the backlight and display


Guest The PocketTV Team

Recommended Posts

Guest Richie M
Ok, i should add the word "programatically" in each of my sentences, sorry, i though that was inplied since this is the Development forum ;)
Not at all Tristan, you just have to explain what you want to start with :roll:

if you had said

1) do you know how to turn the backlight on (when it's currently off) without pressing a key ?  

2) do you know how to exit the low-power display mode without pressing a key ?

in the first place; the key pharse here "without pressing a key" we wouldn't of replied, but as you didn't mention "without pressing a key" we gave you the solution that we knew to a problem you implied in your first post you had.

Sorry we couldn't help, better luck next time eh? :)

Link to comment
Share on other sites

Guest The PocketTV Team

I've got some bad news: changing the value in HKCUControlPanelPowerDisplay

does not prevent the display to go in the power-saving mode after the timeout that was initially set (say, 60 sec).

There must be some type of global system event to ping, to tell the driver that this registry value has been updated.

Link to comment
Share on other sites

Guest midnight

easy :wink:

try these settings.....

HKCUControlPanelScreenSaver Mode=0 (prevents screensaver turning off the backlight)

and, dont know if this is necessary, but try them anyway....

HKCUControlPanelNewPower BacklightTimeout (now i set this to 99999 and it seems to stop the screen from going into half brightness)

HKCUControlPanelBacklight ACTimeout (timeout when docked/on power)

HKCUControlPanelBacklight BatteryTimeout (timeout when using battery not mains supply)

Link to comment
Share on other sites

Guest theodotcom

Can i add a comment, im not really much of a developer and wouldnt know where to start developing for smartphone, however i mentioned in another post that with the gameboy emulator (latest version) as soon as it loads the backlight stays on, when you exit it the backlight goes off, spacemonkey was gonna have a look at the code. but surely part of that code could be used in other apps like this one, wouldn't that resolve this issue?

Link to comment
Share on other sites

Guest The PocketTV Team

We have no problem keeping the backlight on.

But we don't know how to programatically turn it on when it is off. The reason why in some cases we need to do that has been explaind somewhere on this forum. Anyway, this is not our most important problem.

When we don't know is how to prevent the display to shut-off.

We know that on the SPV (only), the registry value

HKCUControlPanelScreenSaver Mode

must be set to 0, but this is not sufficient.

It is necessary to notify the driver that the registry key has been changed, and we don't know what global event the driver is using with relation with this registry key.

For example, when you change the Backlight timout, you should set the global event "BackLightChangeEvent" to notify the driver.

Of course, in case of games, the user usses the buttons to interact with the game, so all the problems we have do not apply to games, because as soon as you press a key, the display driver is notified automatically.

It looks like most of the people who frequent this forum are game developers, am i correct ?

Link to comment
Share on other sites

Guest ambro

hmmm,

just thinking about a couple of ideas which might help

noticed when you sit the phone in the cradle it turns on the backlight straight away even when active sync is not loaded on the computer, and even when the backlight is completely off in low power mode as you mentioned before!

this even happens when the cradle is not connected to the computer!

if you can find out what command lets the phone know its connected to the cradle then you might find your answer to turn on the backlight when its off...

im not a developer with wince so if im talkin rubbish then just say although i hav a lot of experience with web scripting, php asp ect

anyways its just an idea which might help

Link to comment
Share on other sites

Guest ambro

another thought cant you emulate a keypress when you need the light to come on?

then the light switch's on from there you can use the same code that was used to enable the switch (key 7) for pocketmvp..

Link to comment
Share on other sites

Guest The PocketTV Team

It does not work. Neither does it on the Pocket PC.

The display driver is in charge of the display and backlight, and the display driver is not aware of it when you are emulating key pressed in the app (by generating key messages).

This trick only works for preventing the device to auto-power-off on the Pocket PC.

Link to comment
Share on other sites

Guest kingbing

Look at SHIdleTimerReset again. I know it prevents the phone going back to the home screen, but it might also keep the backlight on, and turn it on with no user input.

And look at SystemParametersInfo for setting and getting timeout values. Do a search for "Preventing Automatic Power Off" in the SDK for some similar info. Apps really shouldn't be messing directly with system registry entries...

Link to comment
Share on other sites

Guest The PocketTV Team

Thanks, we already resolved the backlight issue.

For that one the only way it to mess with the registry, unfortunately, but if you do it well, it has no negative effect :-)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.