comparison pytouhou/lib/sdl.pyx @ 419:1c92721f8e49

Re-implement frame control
author Thibaut Girka <thib@sitedethib.com>
date Wed, 06 Feb 2013 18:45:12 +0100
parents 63f59be04a54
children 3a7b36324611
comparison
equal deleted inserted replaced
418:63f59be04a54 419:1c92721f8e49
92 cdef int numkeys 92 cdef int numkeys
93 cdef bint k 93 cdef bint k
94 cdef const Uint8 *state 94 cdef const Uint8 *state
95 state = SDL_GetKeyboardState(&numkeys) 95 state = SDL_GetKeyboardState(&numkeys)
96 return tuple([k is not False for k in state[:numkeys]]) 96 return tuple([k is not False for k in state[:numkeys]])
97
98
99 def get_ticks():
100 return SDL_GetTicks()
101
102
103 def delay(Uint32 ms):
104 SDL_Delay(ms)