aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorThierry Crozat2018-07-01 23:04:43 +0100
committerThierry Crozat2018-07-08 16:54:51 +0100
commitadacb4fcfd743aa3980b3e08c62578f32de2d0b3 (patch)
tree09ad0e04f3d3f984e2fc6e997e722e5d24e084fe /base
parent812ce59ee44d669d2b17a1c1602f9364900b9479 (diff)
downloadscummvm-rg350-adacb4fcfd743aa3980b3e08c62578f32de2d0b3.tar.gz
scummvm-rg350-adacb4fcfd743aa3980b3e08c62578f32de2d0b3.tar.bz2
scummvm-rg350-adacb4fcfd743aa3980b3e08c62578f32de2d0b3.zip
BASE: Add command line stretch mode arg
Diffstat (limited to 'base')
-rw-r--r--base/commandLine.cpp5
-rw-r--r--base/main.cpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 96548b9129..a54f444b6f 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -93,6 +93,7 @@ static const char HELP_STRING[] =
" -g, --gfx-mode=MODE Select graphics scaler (1x,2x,3x,2xsai,super2xsai,\n"
" supereagle,advmame2x,advmame3x,hq2x,hq3x,tv2x,\n"
" dotmatrix)\n"
+ " --stretch-mode=MODE Select stretch mode (center, integral, fit, stretch)"
" --filtering Force filtered graphics mode\n"
" --no-filtering Force unfiltered graphics mode\n"
" --gui-theme=THEME Select GUI theme\n"
@@ -213,6 +214,7 @@ void registerDefaults() {
ConfMan.registerDefault("gfx_mode", "normal");
ConfMan.registerDefault("render_mode", "default");
ConfMan.registerDefault("desired_screen_aspect_ratio", "auto");
+ ConfMan.registerDefault("stretch_mode", "default");
// Sound & Music
ConfMan.registerDefault("music_volume", 192);
@@ -509,6 +511,9 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
DO_OPTION('g', "gfx-mode")
END_OPTION
+ DO_LONG_OPTION("stretch-mode")
+ END_OPTION
+
DO_OPTION_INT('m', "music-volume")
END_OPTION
diff --git a/base/main.cpp b/base/main.cpp
index cbf2e235c3..c43b865251 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -296,6 +296,8 @@ static void setupGraphics(OSystem &system) {
system.setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen"));
if (ConfMan.hasKey("filtering"))
system.setFeatureState(OSystem::kFeatureFilteringMode, ConfMan.getBool("filtering"));
+ if (ConfMan.hasKey("stretch_mode"))
+ system.setStretchMode(ConfMan.get("stretch_mode").c_str());
system.endGFXTransaction();
// When starting up launcher for the first time, the user might have specified