GabrielFrigo4 / SDL-Sharp

SDL2 for C#
Other
17 stars 3 forks source link

Exposed SDL functions for dealing with time #48

Closed john-glover closed 6 months ago

john-glover commented 6 months ago

Exposed new methods in the SDL class for:

These aren't essential, but they're core functionality in SDL; the existing GetTicks has documentation suggesting use of GetTicks64 instead. My motivation for adding the additional methods was an effort to convert https://github.com/zachbarth/minimalist-game-framework to .Net 8 and reliant on an existing SDL nuget package (the package built from this repository) rather than reimplementing all of the interop in the project.

As a side note, I noticed that GetTicks was implemented in SDL.Audio.cs which is probably not organizationally the right place for it -- but I just followed suit because I believe the new methods belong wherever GetTicks is.

I also made the same fix as a pending pull-request, but that change should disappear once it's approved.