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
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
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})
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.
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,