Now that we're highlighting the currently selected preset in the
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 10 Apr 2008 11:11:33 +0000 (11:11 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 10 Apr 2008 11:11:33 +0000 (11:11 +0000)
Type menu, it looks faintly silly that Fifteen doesn't have any
presets other than Custom: you open a Fifteen window in its default
state, and the Type menu appears to be telling you it has a custom
size! Fixed by adding a preset for the default parameters.

I'd quite like to fix this properly by revamping the presets
mechanism in a way that _enforces_ that there must always be a
preset which matches the default parameters, but that's more fiddly
than it sounds. For the moment, this change fixes the only
externally visible infelicity in the current game set.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7983 cda61777-01e9-0310-a592-d414129be87e

fifteen.c

index d3a02f3..ccd1903 100644 (file)
--- a/fifteen.c
+++ b/fifteen.c
@@ -57,6 +57,11 @@ static game_params *default_params(void)
 
 static int game_fetch_preset(int i, char **name, game_params **params)
 {
+    if (i == 0) {
+       *params = default_params();
+       *name = dupstr("4x4");
+       return TRUE;
+    }
     return FALSE;
 }