changeset 763:468dab1dd683

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 d18c0bf11138
files pytouhou/lib/sdl.pyx
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/lib/sdl.pyx
+++ b/pytouhou/lib/sdl.pyx
@@ -64,13 +64,14 @@ class SDLError(gui.Error):
 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()