Try a different cache refresh on lag strategy
This commit is contained in:
parent
73fde8beb7
commit
c302353bd9
7 changed files with 30 additions and 16 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue