diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-09 15:58:34 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-09 15:58:34 +0100 |
| commit | 503f1c4ab81928c2792a2cf73bc97587460dac86 (patch) | |
| tree | e2ab999890d14254bfcc741f162584d5556921af /lightup.c | |
| parent | e30d11ecd169c2e963fada4cac28123b4f4f9a7e (diff) | |
| download | puzzles-503f1c4ab81928c2792a2cf73bc97587460dac86.zip puzzles-503f1c4ab81928c2792a2cf73bc97587460dac86.tar.gz puzzles-503f1c4ab81928c2792a2cf73bc97587460dac86.tar.bz2 puzzles-503f1c4ab81928c2792a2cf73bc97587460dac86.tar.xz | |
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.
Diffstat (limited to 'lightup.c')
| -rw-r--r-- | lightup.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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: |