aboutsummaryrefslogtreecommitdiff
path: root/solo.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-03-22 16:58:22 +0000
committerBen Harris <bjh21@bjh21.me.uk>2023-03-22 16:58:22 +0000
commit6dac51795e5672f32bba787c0f011cb01e464a96 (patch)
tree2018973bd3b6451491af85784566917563c16a44 /solo.c
parent09c15f206edac18bd2158c189c821b9ba85d3939 (diff)
downloadpuzzles-6dac51795e5672f32bba787c0f011cb01e464a96.zip
puzzles-6dac51795e5672f32bba787c0f011cb01e464a96.tar.gz
puzzles-6dac51795e5672f32bba787c0f011cb01e464a96.tar.bz2
puzzles-6dac51795e5672f32bba787c0f011cb01e464a96.tar.xz
Add an environment variable to control initial cursor visibility
If you define PUZZLES_INITIAL_CURSOR=y, puzzles that have a keyboard cursor will default to making it visible rather than invisible at the start of a new game. Behaviour is otherwise the same, so mouse actions will cause the cursor to vanish and keyboard actions will cause it to appear. It's just the default that has changed. The purpose of this is for use on devices and platforms where the primary or only means of interaction is keyboard-based. In those cases, starting with the keyboard cursor invisible is weird and a bit confusing.
Diffstat (limited to 'solo.c')
-rw-r--r--solo.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/solo.c b/solo.c
index 3155abb..6b2862f 100644
--- a/solo.c
+++ b/solo.c
@@ -4559,8 +4559,7 @@ static game_ui *new_ui(const game_state *state)
ui->hx = ui->hy = 0;
ui->hpencil = false;
- ui->hshow = false;
- ui->hcursor = false;
+ ui->hshow = ui->hcursor = getenv_bool("PUZZLES_SHOW_CURSOR", false);
return ui;
}