Browse Source

Add SDL_TICKS_PASSED fallback

Add SDL_TICKS_PASSED fallback definitions in the shared SDL compatibility headers so SDL1-family targets do not fail when the macro is missing from the platform SDL headers.
pull/8497/head
morfidon 7 days ago
parent
commit
bf4a369360
  1. 1
      Source/utils/sdl2_to_1_2_backports.h
  2. 4
      Source/utils/sdl_compat.h

1
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

4
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

Loading…
Cancel
Save