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.
This commit is contained in:
Franklin Wei
2025-01-03 21:03:02 -05:00
committed by Simon Tatham
parent abe1eed3ba
commit 1ece22b758

View File

@ -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)