fixed windows lastframebegin

This commit is contained in:
Jorijn van der Graaf 2026-03-01 03:00:08 +01:00
commit 9b36583e49
2 changed files with 12 additions and 0 deletions

View file

@ -530,6 +530,9 @@ void WindowVulkan::SetTitle(const std::string_view title) {
}
#ifdef CRAFTER_TIMING
std::chrono::time_point<std::chrono::high_resolution_clock> framEnd;
#endif
void WindowVulkan::StartUpdate() {
lastFrameBegin = std::chrono::high_resolution_clock::now();
@ -545,6 +548,7 @@ void WindowVulkan::StartUpdate() {
Render();
lastMousePos = currentMousePos;
currentFrameTime = {start, start-lastFrameBegin};
lastFrameBegin = start;
}
}