Skip to content

Commit 84cd5e1

Browse files
authored
Merge pull request #585 from cjakeman/menu-options02b
02b: Removed menu option checkFastFullScreenAltTab
2 parents 5ad4c62 + 9d8f392 commit 84cd5e1

File tree

12 files changed

+82
-161
lines changed

12 files changed

+82
-161
lines changed

Source/Documentation/Manual/driving.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,33 @@ your train will be in motion or stopped. To look around in the simulation, you
2525
can select different views using the keyboard, as described in
2626
:ref:`Changing the View <driving-changing-view>`.
2727

28+
Cab Letter-Boxing
29+
----------------
30+
31+
OR manages not only cab interiors using 2D images in a MSTS-compatible
32+
way, but also supports 3D models. Most 2D cab images follow MSTS practice,
33+
being 1024 x 768 pixels to suit monitors with a 4:3 aspect ratio.
34+
35+
.. image:: images/options-2dstretch_1.png
36+
37+
So, the problem arises -- how to display these 4:3 cabs on a 16:9 or 16:10
38+
monitor?
39+
40+
One possibility is to enlarge these images to fill the width of wider monitors,
41+
as shown in the image below.
42+
43+
In doing so, we lose a portion from the top and bottom of the image.
44+
You can use the Up and Down Arrow keys to pan and reveal these missing portions.
45+
46+
.. image:: images/options-2dstretch_2.png
47+
48+
Instead of enlarging the image, OR can also 'letterbox' it by showing the full height
49+
and filling the missing space with black bars.
50+
You can activate this mode in-game by pressing Ctrl+1.
51+
52+
.. image:: images/options-2dstretch_3.png
53+
54+
2855
Open Rails Driving Controls
2956
===========================
3057

-34.6 KB
Loading

Source/Documentation/Manual/options.rst

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -242,22 +242,6 @@ Note: This may reduce the frame rate.
242242
Note: Static objects provided with shadows (in the file <route>.ref)
243243
will cast shadows anyway. This option adds shadows for other static objects.
244244

245-
246-
.. _options-fullscreen:
247-
248-
Fast full-screen Alt+Tab
249-
------------------------
250-
251-
When this option is selected, and OR is running full-screen, pressing
252-
Alt+Tab leaves OR full-screen and running, and allows the
253-
:ref:`Dispatcher Window <driving-dispatcher>` to be shown in front of it.
254-
If this option is not selected, OR is minimized.
255-
Each successive press of Alt+Tab will toggle between the map window
256-
and the OR window.
257-
258-
Note: To display the Map Window, the :ref:`Map window option <options-map-window>`
259-
must also be selected and the Map Window started with Ctrl+9.
260-
261245
Glass on in-game windows
262246
------------------------
263247

@@ -299,41 +283,6 @@ may see stuttering or image "tearing". To prevent this, either turn off
299283
the VSync option or reduce the values for video options such as view
300284
distance, anti-aliasing, or world object density.
301285

302-
.. _options-cab-stretch:
303-
304-
% Cab 2D stretch
305-
----------------
306-
307-
OR manages not only cab interiors using 2D images in a MSTS-compatible
308-
way, but also supports 3D models. Most 2D cab images follow MSTS practice,
309-
being 1024 x 768 pixels to suit monitors with a 4:3 aspect ratio.
310-
311-
So, the problem arises -- how to display these 4:3 cabs on a 16:9 or 16:10
312-
monitor?
313-
314-
One possibility is to stretch these images horizontally to match other
315-
aspect ratios, as shown in the image below.
316-
317-
.. image:: images/options-2dstretch_1.png
318-
319-
To respect the proportions however, by default OR does no stretching and
320-
shows the full width of the cab interior, thus losing a portion from the
321-
top and bottom of the image. You can use the Up and Down Arrow keys to pan
322-
and reveal these missing portions.
323-
324-
Therefore the setting for % Cab 2D Stretch has a default value of 0
325-
providing no stretching and a maximum value of 100 which stretches the
326-
picture so as to cover the complete display. Intermediate values provide a
327-
blend of panning and stretching.
328-
329-
.. image:: images/options-2dstretch_2.png
330-
331-
OR can also pillarbox or letterbox the cab by filling the missing space with
332-
black bars. You can activate this mode in-game by pressing Ctrl+1. It overrides
333-
any stretching.
334-
335-
.. image:: images/options-2dstretch_3.png
336-
337286
Viewing distance
338287
----------------
339288

Source/Menu/Options.Designer.cs

Lines changed: 39 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/Menu/Options.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,10 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, bool init
163163
// Video tab
164164
checkDynamicShadows.Checked = Settings.DynamicShadows;
165165
checkShadowAllShapes.Checked = Settings.ShadowAllShapes;
166-
checkFastFullScreenAltTab.Checked = Settings.FastFullScreenAltTab;
167166
checkWindowGlass.Checked = Settings.WindowGlass;
168167
checkModelInstancing.Checked = Settings.ModelInstancing;
169168
checkWire.Checked = Settings.Wire;
170169
checkVerticalSync.Checked = Settings.VerticalSync;
171-
numericCab2DStretch.Value = Settings.Cab2DStretch;
172170
numericViewingDistance.Value = Settings.ViewingDistance;
173171
checkDistantMountains.Checked = Settings.DistantMountains;
174172
labelDistantMountainsViewingDistance.Enabled = checkDistantMountains.Checked;
@@ -454,12 +452,10 @@ void buttonOK_Click(object sender, EventArgs e)
454452
// Video tab
455453
Settings.DynamicShadows = checkDynamicShadows.Checked;
456454
Settings.ShadowAllShapes = checkShadowAllShapes.Checked;
457-
Settings.FastFullScreenAltTab = checkFastFullScreenAltTab.Checked;
458455
Settings.WindowGlass = checkWindowGlass.Checked;
459456
Settings.ModelInstancing = checkModelInstancing.Checked;
460457
Settings.Wire = checkWire.Checked;
461458
Settings.VerticalSync = checkVerticalSync.Checked;
462-
Settings.Cab2DStretch = (int)numericCab2DStretch.Value;
463459
Settings.ViewingDistance = (int)numericViewingDistance.Value;
464460
Settings.DistantMountains = checkDistantMountains.Checked;
465461
Settings.DistantMountainsViewingDistance = (int)numericDistantMountainsViewingDistance.Value * 1000;

Source/Menu/Options.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,13 @@
120120
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121121
<value>17, 17</value>
122122
</metadata>
123+
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124+
<value>17, 17</value>
125+
</metadata>
123126
<metadata name="bindingSourceContent.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124127
<value>114, 17</value>
125128
</metadata>
129+
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
130+
<value>17, 17</value>
131+
</metadata>
126132
</root>

Source/ORTS.Settings/UserSettings.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ public enum DirectXFeature
186186
public bool DisableTCSScripts { get; set; }
187187

188188
// Audio settings:
189-
[Default(true)]
190-
public bool MSTSBINSound { get; set; }
191189
[Default(100)]
192190
public int SoundVolumePercent { get; set; }
193191
[Default(5)]
@@ -201,17 +199,13 @@ public enum DirectXFeature
201199
[Default(false)]
202200
public bool ShadowAllShapes { get; set; }
203201
[Default(false)]
204-
public bool FastFullScreenAltTab { get; set; }
205-
[Default(false)]
206202
public bool WindowGlass { get; set; }
207203
[Default(false)]
208204
public bool ModelInstancing { get; set; }
209205
[Default(true)]
210206
public bool Wire { get; set; }
211207
[Default(false)]
212208
public bool VerticalSync { get; set; }
213-
[Default(0)]
214-
public int Cab2DStretch { get; set; }
215209
[Default(2000)]
216210
public int ViewingDistance { get; set; }
217211
[Default(true)]

Source/Orts.Simulation/Common/Events.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public enum Source
268268
// MSTS/MSTSBin behaviour whenever possible. NEVER return values for
269269
// non-MSTS events when passed an MSTS Source.
270270

271-
public static Event From(bool mstsBinEnabled, Source source, int eventID)
271+
public static Event From(Source source, int eventID)
272272
{
273273
switch (source)
274274
{

Source/RunActivity/Viewer3D/Cameras.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2040,7 +2040,7 @@ public void Initialize()
20402040
float fovFactor = 1f - Math.Max((float)Viewer.CabXLetterboxPixels / Viewer.DisplaySize.X, (float)Viewer.CabYLetterboxPixels / Viewer.DisplaySize.Y);
20412041
FieldOfView = MathHelper.ToDegrees((float)(2 * Math.Atan(fovFactor * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2)))));
20422042
}
2043-
else if (Viewer.Settings.Cab2DStretch == 0 && Viewer.CabExceedsDisplayHorizontally <= 0)
2043+
else if (Viewer.CabExceedsDisplayHorizontally <= 0)
20442044
{
20452045
// We must modify FOV to get correct lookout
20462046
FieldOfView = MathHelper.ToDegrees((float)(2 * Math.Atan((float)Viewer.DisplaySize.Y / Viewer.DisplaySize.X / Viewer.CabTextureInverseRatio * Math.Tan(MathHelper.ToRadians(Viewer.Settings.ViewingFOV / 2)))));

Source/RunActivity/Viewer3D/Processes/RenderProcess.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ internal RenderProcess(Game game)
100100
GraphicsDeviceManager.PreferredDepthStencilFormat = DepthFormat.Depth24Stencil8;
101101
GraphicsDeviceManager.IsFullScreen = Game.Settings.FullScreen;
102102
GraphicsDeviceManager.PreferMultiSampling = (AntiAliasingMethod)Game.Settings.AntiAliasing != AntiAliasingMethod.None;
103-
GraphicsDeviceManager.HardwareModeSwitch = !Game.Settings.FastFullScreenAltTab;
103+
GraphicsDeviceManager.HardwareModeSwitch = false; // for fast full-screen Alt-Tab switching
104104
GraphicsDeviceManager.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>(GDM_PreparingDeviceSettings);
105105
}
106106

0 commit comments

Comments
 (0)