From 5d64cdcac575cd994a449c3c9b183015bbc34caf Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Sat, 14 May 2022 15:32:03 +0200 Subject: [PATCH] Fixed lack of selection blinking due to lack of timing precision. --- PlumbersDontWearTies/Renderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PlumbersDontWearTies/Renderer.cpp b/PlumbersDontWearTies/Renderer.cpp index 490808b..f3d68fd 100644 --- a/PlumbersDontWearTies/Renderer.cpp +++ b/PlumbersDontWearTies/Renderer.cpp @@ -114,7 +114,7 @@ void Renderer::RenderDecisionSelection(const int32_t selectionX, const int32_t s { if (!IsInitialized()) return; - float totalSeconds = SDL_GetPerformanceCounter() / (float)SDL_GetPerformanceFrequency(); + double totalSeconds = SDL_GetPerformanceCounter() / (double)SDL_GetPerformanceFrequency(); uint8_t alpha = static_cast((sin(totalSeconds * M_PI * 2) * 0.25 + 0.75) * 255); SDL_Rect selectionRect = { selectionX, selectionY, selectionW, selectionH };