Try a different cache refresh on lag strategy

This commit is contained in:
Yousef Khadadeh 2025-08-26 12:03:09 +03:00
parent 73fde8beb7
commit c302353bd9
7 changed files with 30 additions and 16 deletions

View file

@ -520,6 +520,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) {
}
SDL_AppResult SDL_AppIterate(void *appstate) {
std::chrono::steady_clock::time_point frameTimeStart = std::chrono::steady_clock::now();
MainStruct& mS = *((MainStruct*)appstate);
#ifdef NDEBUG
@ -584,6 +585,8 @@ SDL_AppResult SDL_AppIterate(void *appstate) {
}
#endif
mS.m->window.lastFrameTime = std::chrono::steady_clock::now() - frameTimeStart;
return SDL_APP_CONTINUE;
}