mouse fix

This commit is contained in:
Jorijn van der Graaf 2026-03-09 21:50:24 +01:00
commit ef199b180e
4 changed files with 20 additions and 6 deletions

View file

@ -598,6 +598,8 @@ void Window::Update() {
vblank = duration_cast<std::chrono::milliseconds>(startTime - frameEnd);
#endif
mouseDelta = {currentMousePos.x-lastMousePos.x, currentMousePos.y-lastMousePos.y};
#ifdef CRAFTER_TIMING
auto renderStart = std::chrono::high_resolution_clock::now();
renderTimings.clear();
@ -608,6 +610,8 @@ void Window::Update() {
totalRender = renderEnd - renderStart;
#endif
lastMousePos = currentMousePos;
#ifdef CRAFTER_TIMING
frameEnd = std::chrono::high_resolution_clock::now();