diff --git a/sc2/ChangeLog b/sc2/ChangeLog index e57408bd3..2c0670b23 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,7 @@ Changes towards version 0.7: +- Added -w and -x commandline options, to counter -f and -o; used these + to implement "Safe Mode" links in the Win32 installer (Bug #946) + - Michael - OpenGL texture loading uses surface pitch instead of screen width. This should head off future bugs similar to Bug #740 (this issue was reported as Bug #956) - Michael diff --git a/sc2/build/win32_install/uqm-installer.nsi b/sc2/build/win32_install/uqm-installer.nsi index 7c5166eeb..c5501c16b 100644 --- a/sc2/build/win32_install/uqm-installer.nsi +++ b/sc2/build/win32_install/uqm-installer.nsi @@ -438,6 +438,8 @@ Section -ShortcutsAndIcons !insertmacro MUI_STARTMENU_WRITE_BEGIN Application CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" "$INSTDIR\uqm.exe" $UQMARGS + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe Mode).lnk" "$INSTDIR\uqm.exe" "-wx -r 640x480 -c none --sound=none -g 1.0 -M 100 -S 100 -T 100 -q medium" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe OpenGL).lnk" "$INSTDIR\uqm.exe" "-wo -r 640x480 -c none --sound=none -g 1.0 -M 100 -S 100 -T 100 -q medium" CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\Documentation" CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" "$INSTDIR\AUTHORS.txt" CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" "$INSTDIR\COPYING.txt" @@ -548,6 +550,8 @@ Section Uninstall Delete "$SMPROGRAMS\$ICONS_GROUP\Saved Games.lnk" Delete "$DESKTOP\The Ur-Quan Masters.lnk" Delete "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe Mode).lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe OpenGL).lnk" Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk" diff --git a/sc2/doc/users/manual.txt b/sc2/doc/users/manual.txt index 091f0f2ad..33c1766e9 100644 --- a/sc2/doc/users/manual.txt +++ b/sc2/doc/users/manual.txt @@ -57,12 +57,23 @@ values are 640x480 and 320x240. Uses full screen mode. Pretty straightforward. Usually good to combine with -r 320x240 unless you're using a scaler. + -w (or --windowed) + +Displays the game in a window. The opposite of --fullscreen. + -o (or --opengl) Use OpenGL drivers. This produces higher-quality graphics, and may be faster as well -- but it also may not work on older cards. It also permits use of any screen resolution. + -x (or --nogl) + +Do not use OpenGL drivers. This is more likely to run on systems with +poor or no 3D acceleration, and is often faster, especially on older +or less well supported cards. Only the 320x240 and 640x480 +resolutions are available when not using OpenGL. + -c (or --scale=mode) Graphics scaling mode (bilinear, biadapt, biadv, triscan, hq or none). diff --git a/sc2/src/starcon2.c b/sc2/src/starcon2.c index 0d491b2be..982eda253 100644 --- a/sc2/src/starcon2.c +++ b/sc2/src/starcon2.c @@ -498,7 +498,7 @@ enum #endif }; -static const char *optString = "+r:d:foc:b:spC:n:?hM:S:T:m:q:ug:l:i:v"; +static const char *optString = "+r:d:foc:b:spC:n:?hM:S:T:m:q:ug:l:i:vwx"; static struct option longOptions[] = { {"res", 1, NULL, 'r'}, @@ -521,6 +521,8 @@ static struct option longOptions[] = {"logfile", 1, NULL, 'l'}, {"intro", 1, NULL, 'i'}, {"version", 0, NULL, 'v'}, + {"windowed", 0, NULL, 'w'}, + {"nogl", 0, NULL, 'x'}, // options with no short equivalent: {"cscan", 1, NULL, CSCAN_OPT}, @@ -624,9 +626,15 @@ parseOptions (int argc, char *argv[], struct options_struct *options) case 'f': options->gfxFlags |= TFB_GFXFLAGS_FULLSCREEN; break; + case 'w': + options->gfxFlags &= ~TFB_GFXFLAGS_FULLSCREEN; + break; case 'o': options->gfxDriver = TFB_GFXDRIVER_SDL_OPENGL; break; + case 'x': + options->gfxDriver = TFB_GFXDRIVER_SDL_PURE; + break; case 'c': // make sure whatever was set by saved config is cleared options->gfxFlags &= ~TFB_GFXFLAGS_SCALE_ANY; @@ -969,7 +977,9 @@ usage (FILE *out, const struct options_struct *defaultOptions) log_add (log_User, " -r, --res=WIDTHxHEIGHT (default 640x480, bigger " "works only with --opengl)"); log_add (log_User, " -f, --fullscreen (default off)"); + log_add (log_User, " -w, --windowed (default on)"); log_add (log_User, " -o, --opengl (default off)"); + log_add (log_User, " -x, --nogl (default on)"); log_add (log_User, " -c, --scale=MODE (bilinear, biadapt, biadv, triscan, " "hq or none (default) )"); log_add (log_User, " -b, --meleezoom=MODE (step, aka pc, or smooth, aka 3do; "