Skip to content

Commit

Permalink
Fixed lack of selection blinking due to lack of timing precision.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikelChan committed May 14, 2022
1 parent e63c49f commit 5d64cdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PlumbersDontWearTies/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint8_t>((sin(totalSeconds * M_PI * 2) * 0.25 + 0.75) * 255);

SDL_Rect selectionRect = { selectionX, selectionY, selectionW, selectionH };
Expand Down

0 comments on commit 5d64cdc

Please sign in to comment.