Hi,
________________________________________
From: [email protected] [[email protected]] 
On Behalf Of ext W. de Hoog [[email protected]]
Sent: Wednesday, March 25, 2009 19:20

>> Note that it's not enough just to use SDL function to wait for events when 
>> it's
>> invisible / idle. SDL does 10Hz polling even when waiting for events which 
>> will
>> drain battery pretty soon.  (I filed a bug about that for upstream SDL 
>> several
>> years ago, it's still not fixed, but there's a broken patch available.)

http://bugzilla.libsdl.org/show_bug.cgi?id=323

>That is sad.

Indeed...

I was thinking of using an SDL semaphore in the main loop
>that is locked/unlocked when osso notifies of display on/off. This would
>not do much then I guess.

Do you have a separate thread that listens on the libosso callback stuff?
That could work also if it "locks up" the main loop when display is turned off 
and
(like your main thread) doesn't use SDL to wait for events.


>> Because of this, in my own SDL code I use select() when the process should
>> be idle in RAM longer times without draining battery. You can get the SDL X
>> socket file descriptor like this:
>
>Please forgive my ignorence but I do not understand the link between
>select() and GetUISocket().

You can in select() listen on that file descriptor.  You could look for an 
example here:
http://hg.berlios.de/repos/hatari/file/c6567e2a430d/src/control.c


  - Eero

PS. Except for some performance issues, Hatari emulator should work fine on N8x0
devices.  I just haven't had time to package the latest version.  A 
configuration
suitable for N8x0 is included with the sources:
http://hg.berlios.de/repos/hatari/file/c6567e2a430d/etc/

Some stuff for the emulator is available from here:
http://koti.mbnet.fi/tammat/hatari/
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to