Support of IsKeyPressed that only trigger for the frame it is pressed on.

This commit is contained in:
2026-08-09 11:23:56 -04:00
parent 681267f445
commit d52c77a017
16 changed files with 151 additions and 34 deletions
+1 -12
View File
@@ -225,20 +225,9 @@ void JulietApplication::Shutdown()
Log(LogLevel::Message, LogCategory::Tool, "Juliet App shutdown Completed");
}
void JulietApplication::Update()
void JulietApplication::Update(float deltaTime)
{
static LARGE_INTEGER frequency = {};
static LARGE_INTEGER lastTime = {};
if (frequency.QuadPart == 0)
{
QueryPerformanceFrequency(&frequency);
QueryPerformanceCounter(&lastTime);
}
LARGE_INTEGER currentTime;
QueryPerformanceCounter(&currentTime);
float deltaTime = static_cast<float>(currentTime.QuadPart - lastTime.QuadPart) / static_cast<float>(frequency.QuadPart);
lastTime = currentTime;
CameraTime += deltaTime;