#define SETUP_TOKEN_INT_FALLBACK_MUSIC_FILE 12
#define SETUP_TOKEN_INT_DEFAULT_LEVEL_SERIES 13
#define SETUP_TOKEN_INT_CHOOSE_FROM_TOP_LEVELDIR 14
+#define SETUP_TOKEN_INT_DEFAULT_WINDOW_WIDTH 15
+#define SETUP_TOKEN_INT_DEFAULT_WINDOW_HEIGHT 16
-#define NUM_INTERNAL_SETUP_TOKENS 15
+#define NUM_INTERNAL_SETUP_TOKENS 17
/* options setup */
#define SETUP_TOKEN_OPTIONS_VERBOSE 0
{ TYPE_STRING, &sxi.fallback_music_file, "fallback_music_file" },
{ TYPE_STRING, &sxi.default_level_series, "default_level_series" },
{ TYPE_BOOLEAN,&sxi.choose_from_top_leveldir, "choose_from_top_leveldir" },
+ { TYPE_INTEGER,&sxi.default_window_width, "default_window_width" },
+ { TYPE_INTEGER,&sxi.default_window_height, "default_window_height" },
};
static struct TokenInfo options_setup_tokens[] =
si->internal.default_level_series = getStringCopy(UNDEFINED_LEVELSET);
si->internal.choose_from_top_leveldir = FALSE;
+ si->internal.default_window_width = WIN_XSIZE_DEFAULT;
+ si->internal.default_window_height = WIN_YSIZE_DEFAULT;
+
si->options.verbose = FALSE;
#if defined(PLATFORM_ANDROID)
userdata_subdir = USERDATA_DIRECTORY_OTHER;
#endif
+ // set default window size (only relevant on program startup)
+ if (setup.internal.default_window_width != 0 &&
+ setup.internal.default_window_height != 0)
+ {
+ WIN_XSIZE = setup.internal.default_window_width;
+ WIN_YSIZE = setup.internal.default_window_height;
+ }
+
InitProgramInfo(command_filename,
config_filename,
userdata_subdir,