Skip to content

Commit

Permalink
sdl/timer: fix build error on SDL2 older than 2.0.18
Browse files Browse the repository at this point in the history
Signed-off-by: Lilis Iskandar <[email protected]>
  • Loading branch information
veeableful committed Mar 14, 2022
1 parent fed6d25 commit 503d73c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion sdl/timer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
package sdl

// #include "sdl_wrapper.h"
/*
#include "sdl_wrapper.h"
#if !(SDL_VERSION_ATLEAST(2,0,18))
#if defined(WARN_OUTDATED)
#pragma message("SDL_GetTicks64 is not supported before SDL 2.0.18")
#endif
static inline Uint64 SDLCALL SDL_GetTicks64(void)
{
return 0;
}
#endif
*/
import "C"

// GetTicks returns the number of milliseconds since the SDL library initialization.
Expand Down

0 comments on commit 503d73c

Please sign in to comment.