diff pytouhou/lib/sdl.pyx @ 589:0768122da817

Add a frameskip option, and use swap interval to implement it.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 10 Oct 2014 15:59:11 +0200
parents c34b23e29d16
children e15672733c93
line wrap: on
line diff
--- a/pytouhou/lib/sdl.pyx
+++ b/pytouhou/lib/sdl.pyx
@@ -280,6 +280,10 @@ cdef void gl_set_attribute(SDL_GLattr at
     if SDL_GL_SetAttribute(attr, value) < 0:
         raise SDLError(SDL_GetError())
 
+cdef int gl_set_swap_interval(int interval) except *:
+    if SDL_GL_SetSwapInterval(interval) < 0:
+        raise SDLError(SDL_GetError())
+
 
 cdef list poll_events():
     cdef SDL_Event event