Skip to content

Commit e23d9c6

Browse files
committed
Displays Menu - Draw the Guard/Superguard frame timings as signed values
There are some instances where the code will run when it shouldn't, and in these cases the value displayed could be negative. So this change prevents really long numbers from being displayed.
1 parent 13de973 commit e23d9c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ttyd-tools/rel/source/draw.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4456,7 +4456,7 @@ void drawActionCommandsTiming()
44564456
case SuccessfulTiming:
44574457
{
44584458
uint32_t CurrentDifficultyFrames;
4459-
uint32_t FramePressed;
4459+
int32_t FramePressed;
44604460
char Button;
44614461

44624462
if (temp_Last_A_Frame > -1)
@@ -4473,7 +4473,7 @@ void drawActionCommandsTiming()
44734473
}
44744474

44754475
sprintf(tempDisplayBuffer,
4476-
"Pressed %c on frame %" PRIu32 " of %" PRIu32,
4476+
"Pressed %c on frame %" PRId32 " of %" PRIu32,
44774477
Button,
44784478
FramePressed,
44794479
CurrentDifficultyFrames);
@@ -4489,7 +4489,7 @@ void drawActionCommandsTiming()
44894489
case PressedTooEarly:
44904490
{
44914491
uint32_t CurrentDifficultyFrames;
4492-
uint32_t FramesEarly;
4492+
int32_t FramesEarly;
44934493
char Button;
44944494

44954495
if (temp_Last_A_Frame > -1)
@@ -4516,7 +4516,7 @@ void drawActionCommandsTiming()
45164516
}
45174517

45184518
sprintf(tempDisplayBuffer,
4519-
"Pressed %c %" PRIu32 " frame%s early",
4519+
"Pressed %c %" PRId32 " frame%s early",
45204520
Button,
45214521
FramesEarly,
45224522
CheckForPlural);

0 commit comments

Comments
 (0)