From 503f1c4ab81928c2792a2cf73bc97587460dac86 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Wed, 9 Aug 2023 15:58:34 +0100 Subject: [PATCH] Distinguish MOVE_UNUSED from MOVE_NO_EFFECT in Light Up Light Up is unusual in that clicking outside the grid hides the cursor, so the return value from clicks outside the grid is MOVE_NO_EFFECT or MOVE_UI_UPDATE rather than the more usual MOVE_UNUSED. --- lightup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightup.c b/lightup.c index 31a3820..e779663 100644 --- a/lightup.c +++ b/lightup.c @@ -1954,7 +1954,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, enum { NONE, FLIP_LIGHT, FLIP_IMPOSSIBLE } action = NONE; int cx = -1, cy = -1; unsigned int flags; - char buf[80], *nullret = MOVE_UI_UPDATE, *empty = MOVE_UI_UPDATE, c; + char buf[80], *nullret = MOVE_NO_EFFECT, *empty = MOVE_UI_UPDATE, c; if (button == LEFT_BUTTON || button == RIGHT_BUTTON) { if (ui->cur_visible) @@ -1978,7 +1978,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, nullret = move_cursor(button, &ui->cur_x, &ui->cur_y, state->w, state->h, false, &ui->cur_visible); } else - return NULL; + return MOVE_UNUSED; switch (action) { case FLIP_LIGHT: