mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
pearl: Return NULL when Backspace or Escape does nothing
When there's no drag in progress, cancelling the drag has no effect. Returning NULL lets the front-end know this, which in particular means the Backspace key can leave the app in KaiOS.
This commit is contained in:
2
pearl.c
2
pearl.c
@ -2135,7 +2135,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (button == 27 || button == '\b') {
|
if ((button == 27 || button == '\b') && ui->ndragcoords >= 0) {
|
||||||
ui->ndragcoords = -1;
|
ui->ndragcoords = -1;
|
||||||
return UI_UPDATE;
|
return UI_UPDATE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user