Re: [pygame] Battery Life

2008-06-03 Thread Marius Gedminas
On Mon, Jun 02, 2008 at 09:31:34PM -0700, The dob wrote: I'm running pygame on Maemo (linux on a mobile device). In my main game loop I am using pygame.event.wait() and sleeping all other running threads. To me this means that until there is an event, the process should not consume very much

Re: [pygame] Battery Life

2008-06-03 Thread James Paige
On Mon, Jun 02, 2008 at 09:31:34PM -0700, The dob wrote: Hi. I'm having a battery problem. I'm running pygame on Maemo (linux on a mobile device). In my main game loop I am using pygame.event.wait() and sleeping all other running threads. To me this means that until there is an event, the

Re: [pygame] Battery Life

2008-06-03 Thread Doug Petkanics
What does strace show your process doing? While the process is idling it shows repeated: select(0,NULL, NULL, NULL, {0, 1}) = 0 (Timeout) select(5, [4], NULL, NULL, {0, 0}) = 0 (Timeout) select(0,NULL, NULL, NULL, {0, 1}) = 0 (Timeout) select(5, [4], NULL, NULL, {0, 0})

[pygame] Battery Life

2008-06-02 Thread The dob
Hi. I'm having a battery problem. I'm running pygame on Maemo (linux on a mobile device). In my main game loop I am using pygame.event.wait() and sleeping all other running threads. To me this means that until there is an event, the process should not consume very much processor time.

Re: [pygame] Battery Life

2008-06-02 Thread René Dudfield
you could try this hack for X11... cheers, import pygame import ctypes import select def get_fd(): w = pygame.display.get_wm_info() w = w['display'] n = int(str(w)[23:-1], 16) n = ctypes.cast(n+8, ctypes.POINTER(ctypes.c_int)).contents.value n = ctypes.cast(n+8,