def set_vsync(self, vsync): if pyglet.options['vsync'] is not None: vsync = pyglet.options['vsync'] self._vsync = vsync # _recreate depends on this if self.context: self.context.set_vsync(vsync)