puzzles: allow secondary select in Rectangles and Map

Change-Id: Ia32d41cd872140481e73b7565904fc196b7c5b01
This commit is contained in:
Franklin Wei 2020-06-26 20:55:25 -04:00
parent d9e084b530
commit f49442d7b7

View file

@ -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[] = {