Energy savings

Previous topic - Next topic

msx

During an animation after a while the screen switches to energy savings and reduces the intensity of light, how can I prevent that?.

MrTAToad

Which platform ?

msx


matchy

I presume it is the iOS screen saver kicking in that requires a touch screen to wake up.

Unless there might be a command (such as NET..) to trigger it, perhaps iPhonePumpEvents and / or some wake up / touch screen refresh call ObjC function?


msx

The problem is that if during the animation, we touch the screen to wake up, cause the end of the animation as well.

Would be nice if there was a command to wake up.

Kitty Hello

Code (glbasic) Select

?IFDEF IPHONE
IMPORT "C" void iPhoneKeepAwake(int bKeep)
?ENDIF


That should work as a GLBasic function then.

msx

I do not understand how I can use that code to awaken the iPhone.  :(

Kitty Hello

uhm... just call
iPhoneKeepAwake(TRUE) somewhere in your code. It will disable the auto-standby as long as your app runs then.

msx

as always ... Thanks Gernot.  :nw:

Mikele

Hey!

How to do that on Android device?

Btw. it's my first post here so... Hello! GLB really rocks!

spacefractal

Actuelly I have seen that game in a Western shooter too, where the lockscreen conflicted Animation, so its just skipped when you unlock again. That is pretty much very annoying, and hence I dont really like when it happens.

So if you ask me, either disable with code, but remember to enable again when animation is ended (screen should allways lock when not used, but could do that when animation is ended). Alternative you could do two finger touch close (or one finger holding a least 1 secs around space spot).....

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

ampos

Quote from: Mikele on 2011-Oct-08
Hey!

How to do that on Android device?

Btw. it's my first post here so... Hello! GLB really rocks!

I would like to know it too...

ampos

I have found

Code (glbasic) Select
android:keepScreenOn="true"

but I don't know where it should be... I have made a few test with no luck...

http://jtomlinson.blogspot.com/2009/03/i-want-to-keep-screen-on.html

http://developer.android.com/reference/android/view/View.html#attr_android:keepScreenOn