From 8f23493e08febc09c370b1d90d891953fa43ddf7 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Tue, 24 Apr 2018 18:06:44 -0400 Subject: 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 --- apps/plugins/puzzles/src/filling.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'apps/plugins/puzzles/src/filling.c') 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, -- cgit v1.1