comparison pytouhou/ui/window.pyx @ 552:aad758aef26d

Don’t store framerate limit in the Window while it already is in the Clock.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 27 May 2014 19:25:33 +0200
parents de778a80820a
children 8f51e34d911c
comparison
equal deleted inserted replaced
551:0d7a16e0f834 552:aad758aef26d
86 86
87 87
88 cdef class Window: 88 cdef class Window:
89 def __init__(self, bint double_buffer=True, long fps_limit=-1, 89 def __init__(self, bint double_buffer=True, long fps_limit=-1,
90 bint fixed_pipeline=False, bint sound=True, bint opengl=True): 90 bint fixed_pipeline=False, bint sound=True, bint opengl=True):
91 self.fps_limit = fps_limit
92 self.use_fixed_pipeline = fixed_pipeline 91 self.use_fixed_pipeline = fixed_pipeline
93 self.runner = None 92 self.runner = None
94 93
95 flags = sdl.WINDOW_SHOWN 94 flags = sdl.WINDOW_SHOWN
96 95
128 glEnableClientState(GL_VERTEX_ARRAY) 127 glEnableClientState(GL_VERTEX_ARRAY)
129 glEnableClientState(GL_TEXTURE_COORD_ARRAY) 128 glEnableClientState(GL_TEXTURE_COORD_ARRAY)
130 else: 129 else:
131 self.win.create_renderer(0) 130 self.win.create_renderer(0)
132 131
133 self.clock = Clock(self.fps_limit) 132 self.clock = Clock(fps_limit)
134 133
135 134
136 cdef void set_size(self, int width, int height) nogil: 135 cdef void set_size(self, int width, int height) nogil:
137 self.win.set_window_size(width, height) 136 self.win.set_window_size(width, height)
138 137