diff options
| author | Simon Tatham <anakin@pobox.com> | 2009-01-26 22:28:17 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2009-01-26 22:28:17 +0000 |
| commit | 4d79c715173ce034ca435df2ee0d2d9cc9d401b6 (patch) | |
| tree | f4f4c464e0b734f97b28b0cb615373da90b81133 | |
| parent | cc0f957d8206833b09e44e639da078fe0d9278d5 (diff) | |
| download | puzzles-4d79c715173ce034ca435df2ee0d2d9cc9d401b6.zip puzzles-4d79c715173ce034ca435df2ee0d2d9cc9d401b6.tar.gz puzzles-4d79c715173ce034ca435df2ee0d2d9cc9d401b6.tar.bz2 puzzles-4d79c715173ce034ca435df2ee0d2d9cc9d401b6.tar.xz | |
Reorder if statements in Unequal's interpret_move() so that presses
of 'h' and 'm' are treated as digits if a square is selected, and
only treated as special commands otherwise. This renders very large
games (just about) playable.
Idea from Ben Hutchings's collection of Debian patches, although I
had to redo his (trivial) patch myself since the code has changed
recently.
(Addendum after committing: hmm, I see Jacob already applied the
original version of the patch a while back. Looks as if the recent
keyboard control change reintroduced the problem. Still, re-fixed
now.)
[originally from svn r8433]
| -rw-r--r-- | unequal.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1299,10 +1299,6 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds, return ""; } } - if (button == 'H' || button == 'h') - return dupstr("H"); - if (button == 'M' || button == 'm') - return dupstr("M"); if (IS_CURSOR_MOVE(button)) { move_cursor(button, &ui->hx, &ui->hy, ds->order, ds->order, 0); @@ -1340,6 +1336,12 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds, return dupstr(buf); } + + if (button == 'H' || button == 'h') + return dupstr("H"); + if (button == 'M' || button == 'm') + return dupstr("M"); + return NULL; } |