Commits

Leonard Ritter  committed 92455a7

support for temporarily ignoring errors (quick win32 fix)

  • Participants
  • Parent commits 6409528

Comments (0)

Files changed (2)

File sdl/builder.py

     AUTOCHECK_BLACKLIST = [
         'SDL_GetError',
         'SDL_ClearError',
+        'SDL_PollEvent',
         'SDL_Init',
         'SDL_Quit',
     ],

File sdl/internal.py

         return getattr(_LIB, name)
     __missing_functions.append(name)
     return None 
+
+ignore_errors = False
     
 def check_error():
     error = _ffi.string(_LIB.SDL_GetError())
     if error:
         _LIB.SDL_ClearError()
+        if ignore_errors:
+            return
         raise SDLError, error
 
 def guard(func):