lightup: Remove tests for keystrokes canonicalised by mid-end

Specifically, the mid-end will never pass ' ', '\r', or '\n' to the
back-end, so it's pointless for the back-end to look for them.
This commit is contained in:
Ben Harris
2022-12-05 11:53:00 +00:00
parent f8ed76f815
commit 8d81c1814d

View File

@ -1898,8 +1898,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
cy = FROMCOORD(y); cy = FROMCOORD(y);
action = (button == LEFT_BUTTON) ? FLIP_LIGHT : FLIP_IMPOSSIBLE; action = (button == LEFT_BUTTON) ? FLIP_LIGHT : FLIP_IMPOSSIBLE;
} else if (IS_CURSOR_SELECT(button) || } else if (IS_CURSOR_SELECT(button) ||
button == 'i' || button == 'I' || button == 'i' || button == 'I') {
button == ' ' || button == '\r' || button == '\n') {
if (ui->cur_visible) { if (ui->cur_visible) {
/* Only allow cursor-effect operations if the cursor is visible /* Only allow cursor-effect operations if the cursor is visible
* (otherwise you have no idea which square it might be affecting) */ * (otherwise you have no idea which square it might be affecting) */