Skip to content

Commit

Permalink
sdl/timer: add stub function for SDL_GetTicks64() when running on SDL…
Browse files Browse the repository at this point in the history
…2 version older than 2.0.18

Signed-off-by: Lilis Iskandar <[email protected]>
  • Loading branch information
veeableful committed Dec 9, 2023
1 parent 2d3a0a9 commit 413c898
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion sdl/timer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
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 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 413c898

Please sign in to comment.