From 1ece22b75827a9c310bc9311dc04ac006489ff54 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Fri, 3 Jan 2025 21:03:02 -0500 Subject: [PATCH] Guess: make cursor visible at low resolution. On many Rockbox devices, the cursor in Guess is invisible due to the low screen resolution, which causes CGAP to round down to zero. This change imposes a lower bound of 1 pixel. Interestingly, this is less of an issue on front ends with antialiasing, since the cursor peg's black border is overdrawn twice with, causing its hazy antialiased boundary to get noticeably darker, even when CGAP is zero. --- guess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guess.c b/guess.c index 5c5f941..4a2a718 100644 --- a/guess.c +++ b/guess.c @@ -553,7 +553,7 @@ static const char *current_key_label(const game_ui *ui, #define HINTOFF (ds->hintsz + ds->gapsz) #define GAP (ds->gapsz) -#define CGAP (ds->gapsz / 2) +#define CGAP max((ds->gapsz / 2), 1) #define PEGRAD (ds->pegrad) #define HINTRAD (ds->hintrad)