#define MAX_INFO_MODES 8
/* screens on the setup screen */
+/* (must match GFX_SPECIAL_ARG_SETUP_* values as defined in src/main.h) */
+/* (should also match corresponding entries in src/conf_gfx.c) */
#define SETUP_MODE_MAIN 0
#define SETUP_MODE_GAME 1
#define SETUP_MODE_EDITOR 2
static void execSetupGraphics()
{
-
- if (video.fullscreen_available && screen_modes == NULL)
+ // if (screen_modes == NULL && video.fullscreen_available)
+ if (screen_modes == NULL && video.fullscreen_modes != NULL)
{
int i;
video.fullscreen_available = FALSE;
}
- if (video.fullscreen_available)
+ // if (video.fullscreen_available)
+ if (screen_mode_current != NULL)
{
setup.fullscreen_mode = screen_mode_current->identifier;
DrawSetupScreen();
}
+#if !defined(PLATFORM_ANDROID)
#if defined(TARGET_SDL2)
static void execSetupChooseWindowSize()
{
DrawSetupScreen();
}
#endif
+#endif
static void execSetupChooseScrollDelay()
{
static struct TokenInfo setup_info_graphics[] =
{
+#if !defined(PLATFORM_ANDROID)
{ TYPE_SWITCH, &setup.fullscreen, "Fullscreen:" },
#if defined(TARGET_SDL2)
{ TYPE_ENTER_LIST, execSetupChooseWindowSize, "Window Scaling:" },
{ TYPE_ENTER_LIST, execSetupChooseScreenMode, "Fullscreen Mode:" },
{ TYPE_STRING, &screen_mode_text, "" },
#endif
+#endif
#if 0
{ TYPE_SWITCH, &setup.scroll_delay, "Scroll Delay:" },
#endif
void RedrawSetupScreenAfterFullscreenToggle()
{
+#if 0
+ if (setup_mode == SETUP_MODE_GRAPHICS ||
+ setup_mode == SETUP_MODE_CHOOSE_WINDOW_SIZE)
+ {
+ if (window_sizes != NULL)
+ {
+ /* set current window size value to configured window size value */
+ window_size_current =
+ getTreeInfoFromIdentifier(window_sizes,
+ i_to_a(setup.window_scaling_percent));
+
+ /* if that fails, set current window size to reliable default value */
+ if (window_size_current == NULL)
+ window_size_current =
+ getTreeInfoFromIdentifier(window_sizes,
+ i_to_a(STD_WINDOW_SCALING_PERCENT));
+
+ /* if that also fails, set current window size to first available value */
+ if (window_size_current == NULL)
+ window_size_current = window_sizes;
+ }
+
+ setup.window_scaling_percent = atoi(window_size_current->identifier);
+
+ /* needed for displaying window size text instead of identifier */
+ window_size_text = window_size_current->name;
+
+ DrawSetupScreen();
+ }
+#else
if (setup_mode == SETUP_MODE_GRAPHICS)
DrawSetupScreen();
+#endif
}
void HandleSetupScreen(int mx, int my, int dx, int dy, int button)