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() { void WindowVulkan::StartUpdate() {
lastFrameBegin = std::chrono::high_resolution_clock::now(); lastFrameBegin = std::chrono::high_resolution_clock::now();
@ -545,6 +548,7 @@ void WindowVulkan::StartUpdate() {
Render(); Render();
lastMousePos = currentMousePos; lastMousePos = currentMousePos;
currentFrameTime = {start, start-lastFrameBegin}; currentFrameTime = {start, start-lastFrameBegin};
lastFrameBegin = start;
} }
} }

View file

@ -115,6 +115,14 @@
"target": "x86_64-w64-mingw32", "target": "x86_64-w64-mingw32",
"march": "x86-64" "march": "x86-64"
}, },
{
"name": "lib-vulkan-windows-timing",
"extends": ["vulkan-windows", "deps-timing"],
"type": "library",
"target": "x86_64-w64-mingw32",
"march": "x86-64",
"defines": [{ "name": "CRAFTER_TIMING" }]
},
{ {
"name": "lib-vulkan-timing", "name": "lib-vulkan-timing",
"extends": ["vulkan", "deps-timing"], "extends": ["vulkan", "deps-timing"],