diff options
author | Franklin Wei <franklin@rockbox.org> | 2020-06-26 20:55:25 -0400 |
---|---|---|
committer | Franklin Wei <franklin@rockbox.org> | 2020-06-27 00:57:18 +0000 |
commit | f49442d7b739e13985e0d0054aa27865c0acff0c (patch) | |
tree | 0af7a3c405568e16ab60c763a5fcb05325a29308 | |
parent | d9e084b530b7610f5a09c531de703540a885ace7 (diff) | |
download | rockbox-f49442d.tar.gz rockbox-f49442d.zip |
puzzles: allow secondary select in Rectangles and Map
Change-Id: Ia32d41cd872140481e73b7565904fc196b7c5b01
-rw-r--r-- | apps/plugins/puzzles/rockbox.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index 74d037f6c5..9155788824 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c @@ -2909,12 +2909,15 @@ static void tune_input(const char *name) { static const char *want_spacebar[] = { "Magnets", + "Map", "Mines", "Palisade", + "Rectangles", NULL }; - /* these get a spacebar on long click */ + /* these get a spacebar on long click - you must also add to the + * falling_edge list below! */ input_settings.want_spacebar = string_in_list(name, want_spacebar); static const char *falling_edge[] = { @@ -2923,20 +2926,25 @@ static void tune_input(const char *name) "Map", "Mines", "Palisade", + "Rectangles", NULL }; /* wait until a key is released to send an action */ input_settings.falling_edge = string_in_list(name, falling_edge); + /* For want_spacebar to work, events must be sent on the falling + * edge */ + assert(!(input_settings.want_spacebar && !input_settings.falling_edge)); + /* ignore repeated keypresses in all games but untangle (mouse * mode overrides this no matter what) */ - static const char *ignore_repeats[] = { + static const char *allow_repeats[] = { "Untangle", NULL }; - input_settings.ignore_repeats = !string_in_list(name, ignore_repeats); + input_settings.ignore_repeats = !string_in_list(name, allow_repeats); /* set to false if you want dragging to be possible */ static const char *rclick_on_hold[] = { |