diff --git a/Source/utils/sdl2_to_1_2_backports.h b/Source/utils/sdl2_to_1_2_backports.h index 2a18cca66..5e13df332 100644 --- a/Source/utils/sdl2_to_1_2_backports.h +++ b/Source/utils/sdl2_to_1_2_backports.h @@ -26,6 +26,7 @@ #define SDL_floor floor #define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) +#define SDL_TICKS_PASSED(A, B) ((Sint32)((B) - (A)) <= 0) //== Events handling diff --git a/Source/utils/sdl_compat.h b/Source/utils/sdl_compat.h index 898a151e5..56690864c 100644 --- a/Source/utils/sdl_compat.h +++ b/Source/utils/sdl_compat.h @@ -19,6 +19,10 @@ #endif #endif +#ifndef SDL_TICKS_PASSED +#define SDL_TICKS_PASSED(A, B) ((Sint32)((B) - (A)) <= 0) +#endif + #ifdef USE_SDL1 #define SDL_Scancode Uint8 #endif