aboutsummaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/UCommandLine.pas7
-rw-r--r--src/base/UGraphic.pas13
-rw-r--r--src/base/UIni.pas8
3 files changed, 27 insertions, 1 deletions
diff --git a/src/base/UCommandLine.pas b/src/base/UCommandLine.pas
index ac0db2c2..7a3761da 100644
--- a/src/base/UCommandLine.pas
+++ b/src/base/UCommandLine.pas
@@ -38,6 +38,7 @@ uses
type
TScreenMode = (scmDefault, scmFullscreen, scmWindowed);
+ TSplitMode = (spmDefault, spmNoSplit, spmSplit);
{**
* Reads infos from ParamStr and set some easy interface variables
@@ -61,6 +62,7 @@ type
NoLog: boolean;
ScreenMode: TScreenMode;
Joypad: boolean;
+ Split: TSplitMode;
// some value variables set when reading infos {-1: Not Set, others: Value}
Depth: integer;
@@ -139,6 +141,7 @@ begin
NoLog := False;
ScreenMode := scmDefault;
Joypad := False;
+ Split := spmDefault;
// some value variables set when reading infos {-1: Not Set, others: Value}
fResolution := '';
@@ -190,6 +193,10 @@ begin
ScreenMode := scmWindowed
else if (Command = 'joypad') then
Joypad := True
+ else if (Command = 'split') then
+ Split := spmSplit
+ else if (Command = 'nosplit') then
+ Split := spmNoSplit
// integer variables
else if (Command = 'depth') then
diff --git a/src/base/UGraphic.pas b/src/base/UGraphic.pas
index bf297220..f0b60b95 100644
--- a/src/base/UGraphic.pas
+++ b/src/base/UGraphic.pas
@@ -616,11 +616,20 @@ var
W, H: integer;
Depth: Integer;
Fullscreen: boolean;
+ Split: boolean;
begin
if (Params.Screens <> -1) then
Screens := Params.Screens + 1
else
Screens := Ini.Screens + 1;
+ case Params.Split of
+ spmSplit:
+ Split := True;
+ spmNoSplit:
+ Split := False;
+ else
+ Split := Ini.Split = 1;
+ end; // case
// Set minimum color component sizes
// Note: do not request an alpha plane with SDL_GL_ALPHA_SIZE here as
@@ -647,8 +656,10 @@ begin
S := IResolution[Ini.Resolution];
I := Pos('x', S);
- W := StrToInt(Copy(S, 1, I-1)) * Screens;
+ W := StrToInt(Copy(S, 1, I-1));
H := StrToInt(Copy(S, I+1, 1000));
+ if ((Screens > 1) and not Split) then
+ W := W * Screens;
if (Params.Depth <> -1) then
Depth := Params.Depth
diff --git a/src/base/UIni.pas b/src/base/UIni.pas
index beb9faa8..a455ed8b 100644
--- a/src/base/UIni.pas
+++ b/src/base/UIni.pas
@@ -115,6 +115,7 @@ type
// Graphics
Screens: integer;
+ Split: integer;
Resolution: integer;
Depth: integer;
VisualizerOption: integer;
@@ -206,6 +207,7 @@ const
IDebug: array[0..1] of UTF8String = ('Off', 'On');
IScreens: array[0..1] of UTF8String = ('1', '2');
+ ISplit: array[0..1] of UTF8String = ('Off', 'On');
IFullScreen: array[0..1] of UTF8String = ('Off', 'On');
IDepth: array[0..1] of UTF8String = ('16 bit', '32 bit');
IVisualizer: array[0..2] of UTF8String = ('Off', 'WhenNoVideo','On');
@@ -786,6 +788,9 @@ begin
// Screens
Screens := GetArrayIndex(IScreens, IniFile.ReadString('Graphics', 'Screens', IScreens[0]));
+ // Split mode
+ Split := GetArrayIndex(ISplit, IniFile.ReadString('Graphics', 'Split', ISplit[0]));
+
// FullScreen
FullScreen := GetArrayIndex(IFullScreen, IniFile.ReadString('Graphics', 'FullScreen', 'On'));
@@ -1072,6 +1077,9 @@ begin
// Screens
IniFile.WriteString('Graphics', 'Screens', IScreens[Screens]);
+ // Split
+ IniFile.WriteString('Graphics', 'Split', ISplit[Split]);
+
// FullScreen
IniFile.WriteString('Graphics', 'FullScreen', IFullScreen[FullScreen]);