haskell-game / sdl2

Haskell bindings to the SDL2 library
Other
363 stars 87 forks source link

Add ticks64 #294

Closed dxtr closed 1 year ago

dxtr commented 1 year ago

This is a wrapper around SDL_GetTicks64

dpwiz commented 1 year ago

This function is available since SDL 2.0.18.

Should be under the recent-ish flag/guard:

{-# LANGUAGE CPP #-}

...

#ifdef RECENT_ISH
...
#endif
dxtr commented 1 year ago

You're too fast! :)

dxtr commented 1 year ago

Okay there we go. Tested this with the UserEvent example by replacing ticks with ticks64 and it seems to work.

Sorry about that, I was banking on that it'd take a while for you to get to it

dxtr commented 1 year ago

Also, should I use recent-ish for functions added after 2.0.6?

dpwiz commented 1 year ago

The recent-ish cutoff is 2.0.8, the version in Ubuntu LTS-18. It should be EOL this year, but apparently Hackage and Stackage are still on it.

dxtr commented 1 year ago

Seems like the windows builds aren't happy