File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ PG_UnlockMutex(SDL_mutex *mutex)
115115#define PG_FIND_VNUM_MINOR (ver ) SDL_VERSIONNUM_MINOR(ver)
116116#define PG_FIND_VNUM_MICRO (ver ) SDL_VERSIONNUM_MICRO(ver)
117117
118+ #define PG_INIT_TIMER 0
119+
118120#else /* ~SDL_VERSION_ATLEAST(3, 0, 0)*/
119121#define PG_ShowCursor () SDL_ShowCursor(SDL_ENABLE)
120122#define PG_HideCursor () SDL_ShowCursor(SDL_DISABLE)
@@ -180,6 +182,8 @@ PG_UnlockMutex(SDL_mutex *mutex)
180182#define PG_FIND_VNUM_MINOR (ver ) ver.minor
181183#define PG_FIND_VNUM_MICRO (ver ) ver.patch
182184
185+ #define PG_INIT_TIMER SDL_INIT_TIMER
186+
183187#if SDL_VERSION_ATLEAST (2 , 0 , 14 )
184188#define PG_SurfaceHasRLE SDL_HasSurfaceRLE
185189#else
Original file line number Diff line number Diff line change @@ -341,10 +341,10 @@ pg_init(PyObject *self, PyObject *_null)
341341
342342 /*nice to initialize timer, so startup time will reflec pg_init() time*/
343343#if defined(WITH_THREAD ) && !defined(MS_WIN32 ) && defined(SDL_INIT_EVENTTHREAD )
344- pg_sdl_was_init = SDL_Init (SDL_INIT_EVENTTHREAD | SDL_INIT_TIMER |
344+ pg_sdl_was_init = SDL_Init (SDL_INIT_EVENTTHREAD | PG_INIT_TIMER |
345345 PG_INIT_NOPARACHUTE ) == 0 ;
346346#else
347- pg_sdl_was_init = SDL_Init (SDL_INIT_TIMER | PG_INIT_NOPARACHUTE ) == 0 ;
347+ pg_sdl_was_init = SDL_Init (PG_INIT_TIMER | PG_INIT_NOPARACHUTE ) == 0 ;
348348#endif
349349
350350 pg_env_blend_alpha_SDL2 = SDL_getenv ("PYGAME_BLEND_ALPHA_SDL2" );
You can’t perform that action at this time.
0 commit comments