Mercurial > touhou
diff pytouhou/ui/window.pyx @ 596:ab131d04987d
Fix a regression introduced in the previous commit when the interface has a different resolution than 640×480 and framebuffer_blit is enabled.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 25 Oct 2014 18:49:41 +0200 |
parents | 12756994a92c |
children | 3c2f96f1d715 |
line wrap: on
line diff
--- a/pytouhou/ui/window.pyx +++ b/pytouhou/ui/window.pyx @@ -77,17 +77,19 @@ cdef class Runner: cdef class Window: - def __init__(self, backend, long fps_limit=-1, frameskip=1): + def __init__(self, backend, int width=640, int height=480, long fps_limit=-1, frameskip=1): if backend is not None: self.win = backend.create_window( 'PyTouhou', sdl.WINDOWPOS_CENTERED, sdl.WINDOWPOS_CENTERED, - 640, 480, #XXX + width, height, frameskip) self.clock = Clock(fps_limit) self.frame = 0 self.frameskip = frameskip + self.width = width + self.height = height cdef void set_size(self, int width, int height) nogil: