Added fullscreen option to setup menu; fixed OpenGL menu comment
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1913 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -198,9 +198,9 @@ static CHOICE_OPTION driver_opts[] = {
|
|||||||
"is available for 320x240 and 640x480."
|
"is available for 320x240 and 640x480."
|
||||||
} },
|
} },
|
||||||
{ "Never",
|
{ "Never",
|
||||||
{ "Uses SDL Framebuffer mode if possible,",
|
{ "Always use OpenGL.",
|
||||||
"and OpenGL otherwise. Framebuffer mode",
|
"OpenGL can produce any resolution and is",
|
||||||
"is available for 320x240 and 640x480."
|
"usually hardware-accelerated."
|
||||||
} },
|
} },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -221,6 +221,20 @@ static CHOICE_OPTION bpp_opts[] = {
|
|||||||
""
|
""
|
||||||
} } };
|
} } };
|
||||||
|
|
||||||
|
static CHOICE_OPTION fullscreen_opts[] = {
|
||||||
|
{ "Windowed",
|
||||||
|
{ "Display everything in a window.",
|
||||||
|
"(if windowing is available)",
|
||||||
|
""
|
||||||
|
} },
|
||||||
|
{ "Fullscreen",
|
||||||
|
{ "Game occupies the entire screen.",
|
||||||
|
"(if available)",
|
||||||
|
""
|
||||||
|
} },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_OPENGL
|
#ifdef HAVE_OPENGL
|
||||||
#define RES_OPTS 4
|
#define RES_OPTS 4
|
||||||
#else
|
#else
|
||||||
@@ -238,7 +252,8 @@ static WIDGET_CHOICE cmdline_opts[] = {
|
|||||||
{ CHOICE_PREFACE, "Scan Style", 2, 2, scan_opts, 0, 0 },
|
{ CHOICE_PREFACE, "Scan Style", 2, 2, scan_opts, 0, 0 },
|
||||||
{ CHOICE_PREFACE, "Scroll Style", 2, 2, scroll_opts, 0, 0 },
|
{ CHOICE_PREFACE, "Scroll Style", 2, 2, scroll_opts, 0, 0 },
|
||||||
{ CHOICE_PREFACE, "Subtitles", 2, 2, subtitles_opts, 0, 0 },
|
{ CHOICE_PREFACE, "Subtitles", 2, 2, subtitles_opts, 0, 0 },
|
||||||
{ CHOICE_PREFACE, "Music Driver", 2, 3, music_opts, 0, 0 } };
|
{ CHOICE_PREFACE, "Music Driver", 2, 3, music_opts, 0, 0 },
|
||||||
|
{ CHOICE_PREFACE, "Display", 2, 2, fullscreen_opts, 0, 0} };
|
||||||
|
|
||||||
static WIDGET_BUTTON quit_button = BUTTON_INIT (quit_main_menu,
|
static WIDGET_BUTTON quit_button = BUTTON_INIT (quit_main_menu,
|
||||||
"Quit Setup Menu",
|
"Quit Setup Menu",
|
||||||
@@ -286,6 +301,7 @@ static WIDGET *graphics_widgets[] = {
|
|||||||
#ifdef HAVE_OPENGL
|
#ifdef HAVE_OPENGL
|
||||||
(WIDGET *)(&cmdline_opts[1]),
|
(WIDGET *)(&cmdline_opts[1]),
|
||||||
#endif
|
#endif
|
||||||
|
(WIDGET *)(&cmdline_opts[11]),
|
||||||
(WIDGET *)(&cmdline_opts[2]),
|
(WIDGET *)(&cmdline_opts[2]),
|
||||||
(WIDGET *)(&cmdline_opts[3]),
|
(WIDGET *)(&cmdline_opts[3]),
|
||||||
(WIDGET *)(&cmdline_opts[4]),
|
(WIDGET *)(&cmdline_opts[4]),
|
||||||
@@ -317,9 +333,9 @@ static WIDGET_MENU_SCREEN graphics_menu = {
|
|||||||
"Graphics Options",
|
"Graphics Options",
|
||||||
{ {0, 0}, NULL },
|
{ {0, 0}, NULL },
|
||||||
#ifdef HAVE_OPENGL
|
#ifdef HAVE_OPENGL
|
||||||
5, graphics_widgets,
|
6, graphics_widgets,
|
||||||
#else
|
#else
|
||||||
4, graphics_widgets,
|
5, graphics_widgets,
|
||||||
#endif
|
#endif
|
||||||
0 };
|
0 };
|
||||||
|
|
||||||
@@ -448,6 +464,7 @@ SetDefaults (void)
|
|||||||
cmdline_opts[7].selected = opts.cscan;
|
cmdline_opts[7].selected = opts.cscan;
|
||||||
cmdline_opts[8].selected = opts.scroll;
|
cmdline_opts[8].selected = opts.scroll;
|
||||||
cmdline_opts[9].selected = opts.subtitles;
|
cmdline_opts[9].selected = opts.subtitles;
|
||||||
|
cmdline_opts[11].selected = opts.fullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -464,6 +481,7 @@ PropagateResults (void)
|
|||||||
opts.cscan = cmdline_opts[7].selected;
|
opts.cscan = cmdline_opts[7].selected;
|
||||||
opts.scroll = cmdline_opts[8].selected;
|
opts.scroll = cmdline_opts[8].selected;
|
||||||
opts.subtitles = cmdline_opts[9].selected;
|
opts.subtitles = cmdline_opts[9].selected;
|
||||||
|
opts.fullscreen = cmdline_opts[11].selected;
|
||||||
|
|
||||||
SetGlobalOptions (&opts);
|
SetGlobalOptions (&opts);
|
||||||
}
|
}
|
||||||
@@ -582,6 +600,8 @@ GetGlobalOptions (GLOBALOPTS *opts)
|
|||||||
{
|
{
|
||||||
opts->scaler = OPTVAL_NO_SCALE;
|
opts->scaler = OPTVAL_NO_SCALE;
|
||||||
}
|
}
|
||||||
|
opts->fullscreen = (GfxFlags & TFB_GFXFLAGS_FULLSCREEN) ?
|
||||||
|
OPTVAL_ENABLED : OPTVAL_DISABLED;
|
||||||
opts->subtitles = optSubtitles ? OPTVAL_ENABLED : OPTVAL_DISABLED;
|
opts->subtitles = optSubtitles ? OPTVAL_ENABLED : OPTVAL_DISABLED;
|
||||||
opts->scanlines = (GfxFlags & TFB_GFXFLAGS_SCANLINES) ?
|
opts->scanlines = (GfxFlags & TFB_GFXFLAGS_SCANLINES) ?
|
||||||
OPTVAL_ENABLED : OPTVAL_DISABLED;
|
OPTVAL_ENABLED : OPTVAL_DISABLED;
|
||||||
@@ -761,6 +781,10 @@ SetGlobalOptions (GLOBALOPTS *opts)
|
|||||||
} else {
|
} else {
|
||||||
NewGfxFlags &= ~TFB_GFXFLAGS_SCANLINES;
|
NewGfxFlags &= ~TFB_GFXFLAGS_SCANLINES;
|
||||||
}
|
}
|
||||||
|
if (opts->fullscreen)
|
||||||
|
NewGfxFlags |= TFB_GFXFLAGS_FULLSCREEN;
|
||||||
|
else
|
||||||
|
NewGfxFlags &= ~TFB_GFXFLAGS_FULLSCREEN;
|
||||||
|
|
||||||
if ((NewWidth != ScreenWidthActual) ||
|
if ((NewWidth != ScreenWidthActual) ||
|
||||||
(NewHeight != ScreenHeightActual) ||
|
(NewHeight != ScreenHeightActual) ||
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ typedef struct globalopts_struct {
|
|||||||
OPT_RESTYPE res;
|
OPT_RESTYPE res;
|
||||||
OPT_DRIVERTYPE driver;
|
OPT_DRIVERTYPE driver;
|
||||||
OPT_DEPTH depth;
|
OPT_DEPTH depth;
|
||||||
|
OPT_ENABLABLE fullscreen;
|
||||||
OPT_ENABLABLE subtitles, scanlines;
|
OPT_ENABLABLE subtitles, scanlines;
|
||||||
OPT_CONSOLETYPE music, menu, text, cscan, scroll;
|
OPT_CONSOLETYPE music, menu, text, cscan, scroll;
|
||||||
} GLOBALOPTS;
|
} GLOBALOPTS;
|
||||||
|
|||||||
Reference in New Issue
Block a user