Added commandline and installer options for "Safe Mode" startup
(See Bug #946 for more details.) git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2673 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
Changes towards version 0.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.
|
- OpenGL texture loading uses surface pitch instead of screen width.
|
||||||
This should head off future bugs similar to Bug #740 (this issue was
|
This should head off future bugs similar to Bug #740 (this issue was
|
||||||
reported as Bug #956) - Michael
|
reported as Bug #956) - Michael
|
||||||
|
|||||||
@@ -438,6 +438,8 @@ Section -ShortcutsAndIcons
|
|||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||||
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
|
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" "$INSTDIR\uqm.exe" $UQMARGS
|
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"
|
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\Documentation"
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" "$INSTDIR\AUTHORS.txt"
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" "$INSTDIR\AUTHORS.txt"
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" "$INSTDIR\COPYING.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 "$SMPROGRAMS\$ICONS_GROUP\Saved Games.lnk"
|
||||||
Delete "$DESKTOP\The Ur-Quan Masters.lnk"
|
Delete "$DESKTOP\The Ur-Quan Masters.lnk"
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\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\AUTHORS.lnk"
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk"
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk"
|
||||||
|
|||||||
@@ -57,12 +57,23 @@ values are 640x480 and 320x240.
|
|||||||
Uses full screen mode. Pretty straightforward. Usually good to
|
Uses full screen mode. Pretty straightforward. Usually good to
|
||||||
combine with -r 320x240 unless you're using a scaler.
|
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)
|
-o (or --opengl)
|
||||||
|
|
||||||
Use OpenGL drivers. This produces higher-quality graphics, and may be
|
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
|
faster as well -- but it also may not work on older cards. It also
|
||||||
permits use of any screen resolution.
|
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)
|
-c (or --scale=mode)
|
||||||
|
|
||||||
Graphics scaling mode (bilinear, biadapt, biadv, triscan, hq or none).
|
Graphics scaling mode (bilinear, biadapt, biadv, triscan, hq or none).
|
||||||
|
|||||||
+11
-1
@@ -498,7 +498,7 @@ enum
|
|||||||
#endif
|
#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[] =
|
static struct option longOptions[] =
|
||||||
{
|
{
|
||||||
{"res", 1, NULL, 'r'},
|
{"res", 1, NULL, 'r'},
|
||||||
@@ -521,6 +521,8 @@ static struct option longOptions[] =
|
|||||||
{"logfile", 1, NULL, 'l'},
|
{"logfile", 1, NULL, 'l'},
|
||||||
{"intro", 1, NULL, 'i'},
|
{"intro", 1, NULL, 'i'},
|
||||||
{"version", 0, NULL, 'v'},
|
{"version", 0, NULL, 'v'},
|
||||||
|
{"windowed", 0, NULL, 'w'},
|
||||||
|
{"nogl", 0, NULL, 'x'},
|
||||||
|
|
||||||
// options with no short equivalent:
|
// options with no short equivalent:
|
||||||
{"cscan", 1, NULL, CSCAN_OPT},
|
{"cscan", 1, NULL, CSCAN_OPT},
|
||||||
@@ -624,9 +626,15 @@ parseOptions (int argc, char *argv[], struct options_struct *options)
|
|||||||
case 'f':
|
case 'f':
|
||||||
options->gfxFlags |= TFB_GFXFLAGS_FULLSCREEN;
|
options->gfxFlags |= TFB_GFXFLAGS_FULLSCREEN;
|
||||||
break;
|
break;
|
||||||
|
case 'w':
|
||||||
|
options->gfxFlags &= ~TFB_GFXFLAGS_FULLSCREEN;
|
||||||
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
options->gfxDriver = TFB_GFXDRIVER_SDL_OPENGL;
|
options->gfxDriver = TFB_GFXDRIVER_SDL_OPENGL;
|
||||||
break;
|
break;
|
||||||
|
case 'x':
|
||||||
|
options->gfxDriver = TFB_GFXDRIVER_SDL_PURE;
|
||||||
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
// make sure whatever was set by saved config is cleared
|
// make sure whatever was set by saved config is cleared
|
||||||
options->gfxFlags &= ~TFB_GFXFLAGS_SCALE_ANY;
|
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 "
|
log_add (log_User, " -r, --res=WIDTHxHEIGHT (default 640x480, bigger "
|
||||||
"works only with --opengl)");
|
"works only with --opengl)");
|
||||||
log_add (log_User, " -f, --fullscreen (default off)");
|
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, " -o, --opengl (default off)");
|
||||||
|
log_add (log_User, " -x, --nogl (default on)");
|
||||||
log_add (log_User, " -c, --scale=MODE (bilinear, biadapt, biadv, triscan, "
|
log_add (log_User, " -c, --scale=MODE (bilinear, biadapt, biadv, triscan, "
|
||||||
"hq or none (default) )");
|
"hq or none (default) )");
|
||||||
log_add (log_User, " -b, --meleezoom=MODE (step, aka pc, or smooth, aka 3do; "
|
log_add (log_User, " -b, --meleezoom=MODE (step, aka pc, or smooth, aka 3do; "
|
||||||
|
|||||||
Reference in New Issue
Block a user