summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/src/filling.c
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2018-04-24 18:06:44 -0400
committerFranklin Wei <git@fwei.tk>2018-04-24 19:06:30 -0400
commit8f23493e08febc09c370b1d90d891953fa43ddf7 (patch)
tree99fcf3e896c96c969bf2b424af8e327a3cf74787 /apps/plugins/puzzles/src/filling.c
parentef0fb52113447c15f97eb8c707f56db4074eb578 (diff)
downloadrockbox-8f23493e08febc09c370b1d90d891953fa43ddf7.zip
rockbox-8f23493e08febc09c370b1d90d891953fa43ddf7.tar.gz
rockbox-8f23493e08febc09c370b1d90d891953fa43ddf7.tar.bz2
rockbox-8f23493e08febc09c370b1d90d891953fa43ddf7.tar.xz
puzzles: resync with upstream
This brings the upstream version to b3da238 (though some of my own changes are included on top of that). Change-Id: Ida73e8cd86765413147ce891af3cc2b7aeda2b2a
Diffstat (limited to 'apps/plugins/puzzles/src/filling.c')
-rw-r--r--apps/plugins/puzzles/src/filling.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/apps/plugins/puzzles/src/filling.c b/apps/plugins/puzzles/src/filling.c
index c278ada..0e89728 100644
--- a/apps/plugins/puzzles/src/filling.c
+++ b/apps/plugins/puzzles/src/filling.c
@@ -1287,9 +1287,22 @@ static const char *validate_desc(const game_params *params, const char *desc)
return (area < sz) ? "Not enough data to fill grid" : NULL;
}
-static char *game_request_keys(const game_params *params)
+static key_label *game_request_keys(const game_params *params, int *nkeys)
{
- return dupstr("1234567890\b");
+ key_label *keys = snewn(11, key_label);
+ *nkeys = 11;
+
+ int i;
+
+ for(i = 0; i < 10; ++i)
+ {
+ keys[i].button = '0' + i;
+ keys[i].label = NULL;
+ }
+ keys[10].button = '\b';
+ keys[10].label = NULL;
+
+ return keys;
}
static game_state *new_game(midend *me, const game_params *params,