Closed MAJigsaw77 closed 1 month ago
Just Fyi: SDL_AddTimer takes a uint32 (ms) and not a double, so this still causes the framerate to be slightly off. A possible fix would be using std::chrono
I appreciate the initiative, but this doesn't resolve any problems, and increases cpu usage. We are going to handle this in a very different way in the next(probably) version of lime.
When sdl 3 is implemented we can use SDL_GetTicksNS to get nanoseconds instead and its in Uint64
The plan is to stop using SDL to construct the main loop.
When sdl 3 is implemented we can use SDL_GetTicksNS to get nanoseconds instead and its in Uint64
Updated frame rate calculations to improve timing accuracy.
Replaced Uint32 with double for precise timing values.
Switched from SDL_GetTicks() to SDL_GetPerformanceCounter() and SDL_GetPerformanceFrequency() for high-resolution timing.