changeset 763:468dab1dd683 default tip

Python: Fix video argument (thanks Doomfan!)
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 09 Feb 2021 22:50:18 +0100
parents cad9e422b18f
children
files pytouhou/lib/sdl.pyx
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/lib/sdl.pyx	Wed Jan 06 01:47:24 2021 +0100
+++ b/pytouhou/lib/sdl.pyx	Tue Feb 09 22:50:18 2021 +0100
@@ -64,13 +64,14 @@
 class SDL:
     def __init__(self, *, video=True, sound=True):
         self.sound = sound
+        self.video = video
 
     def __enter__(self):
         global keyboard_state
 
         IF UNAME_SYSNAME == "Windows":
             SDL_SetMainReady()
-        init(SDL_INIT_VIDEO if video else 0)
+        init(SDL_INIT_VIDEO if self.video else 0)
         img_init(IMG_INIT_PNG)
         ttf_init()