Reply
Thread Tools
Posts: 145 | Thanked: 304 times | Joined on Jan 2010 @ Milton Keynes, UK
#1
Hi Guys,

My current app uses the accellerometer which is great but after 30 seconds the screen starts to dim, and then the screen saver kicks in...is there anyway to disable this while the game is playing?

Cheers
Jamie
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#2
There is an app for Diablo called "more dimming options".

Also, for Diablo it was something like this Jamie.

gconftool-2 --type int --set /apps/osso/applet/osso-applet-display/turn_off_display 6000000
gconftool-2 --type int --set /apps/osso/applet/osso-applet-display/brightness_period 6000000
gconftool-2 --type int --set /system/osso/dsm/display/display_dim_timeout 6000000
gconftool-2 --type int --set /system/osso/dsm/display/display_blank_timeout 6000000
 

The Following User Says Thank You to Addison For This Useful Post:
Posts: 324 | Thanked: 371 times | Joined on Dec 2009 @ Vancouver, BC
#3
Here is how I did it:

Code:
try:
    from osso import Context,  DeviceState
    use_osso = True
except:
    use_osso = False

init()
if use_osso:
    osso_c = Context("Flobby", "0.0.1", False)
    device = DeviceState(osso_c)
Then every 10 seconds, run:
Code:
if use_osso:
       device.display_state_on()
 

The Following User Says Thank You to Slocan For This Useful Post:
Posts: 145 | Thanked: 304 times | Joined on Jan 2010 @ Milton Keynes, UK
#4
Hi Slocan,

your method works a treat, using that does it mean I need to add osso as a dependency when packaging my game?

Cheers!
 

The Following User Says Thank You to jamiefuller For This Useful Post:
Posts: 324 | Thanked: 371 times | Joined on Dec 2009 @ Vancouver, BC
#5
Originally Posted by jamiefuller View Post
your method works a treat, using that does it mean I need to add osso as a dependency when packaging my game?
Yeah, you probably should add python-osso as a dependency to the package.
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:36.