[SDL] Meeting low power device demands

Ryan C. Gordon icculus at icculus.org
Tue Jul 19 20:39:54 PDT 2011


> after a "should redraw" event happens). This would be the equivalent of
> a Win32 application using WM_PAINT, an X11 application using the
> "Expose" event, an OS X application overriding NSView's drawRect member

Obviously SDL's API allows for this, although it may not be hooked up at 
the moment for iOS, etc. This is fixable.

I had a patch for 1.2 floating around to make SDL_WaitEvent() do a true 
wait instead of polling, so that embedded devices could go to an idle 
state when the user wasn't touching anything. I'd like to make something 
like that a formal part of 1.3 if possible. It could be done with the 
existing SDL_WaitEvent(), we'd just have to make sure everything that we 
care about can be marshaled into a single select() (or whatever) call.

> Another issue is low memory warnings. I know for a fact that both
> Android (android.app.Activity's onLowMemory() function) and iOS
> (UIApplicationDelegate's applicationDidReceiveMemoryWarning function)
> provide these warnings, SDL should generate an event for them.

This is a good idea.

--ryan.




More information about the SDL mailing list