Skip to content

Commit 2b11a3f

Browse files
committed
UILetterboxing: allow letterbox to get disabled sooner
1 parent 179a1a4 commit 2b11a3f

File tree

2 files changed

+76
-70
lines changed

2 files changed

+76
-70
lines changed

OutRun2006Tweaks.ini

Lines changed: 71 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
[Performance]
44
# Set to 0 to disable this framelimiter if you want to use an external one instead.
5-
# (with FramerateUnlockExperimental enabled, this can be increased above 60FPS without affecting game speed)
5+
# (with FramerateUnlockExperimental enabled this can be increased above 60FPS without affecting game speed)
66
FramerateLimit = 60
77

88
# 0 = efficient mode
99
# 1 = accurate mode
10-
# The default 0 should work fine for most people, but if you have issues it might be worth trying the accurate mode.
10+
# Default 0 should work fine for most people, but if you have issues it might be worth trying the accurate mode.
1111
FramerateLimitMode = 0
1212

1313
# Unlimits framerate during load screens to help reduce load times.
@@ -22,59 +22,58 @@ FramerateUnlockExperimental = true
2222
# Set to 0 to disable VSync, 1 for normal v-sync, or 2 for half-refresh-rate vsync
2323
VSync = 1
2424

25-
[Vibration]
26-
# Enable/disable the xbox vibration code, or customise it
27-
# 0 = disable
28-
# 1 = enable xbox vibration code
29-
# 2 = ^ with L/R motors swapped
30-
# 3 = ^ with L/R motors merged together
31-
VibrationMode = 1
25+
[Graphics]
26+
# Adjusts the UI scaling applied by the game
27+
# 0 = game default, stretches to screen ratio
28+
# 1 = 4:3 UI centered to middle of screen
29+
# 2 = mostly fixed scaling without stretching, based on Outrun Online Arcade
30+
#
31+
# NOTE: these modes will enable 4:3 letterboxing during menus, but in-game won't have any letterboxing
32+
# Outrun Online Arcade scaling required many manual code fixes, if you notice anything broken please let me know!
33+
UIScalingMode = 0
3234

33-
# XInput device to send vibration to, default should work fine in most cases, but if you don't notice any vibration you can try increasing this here
34-
VibrationControllerId = 0
35+
# 1 - 16, 0 to leave it at games default.
36+
AnisotropicFiltering = 16
3537

36-
# VibrationStrength range is 0 to 10
37-
VibrationStrength = 10
38+
# Resolution used for car reflections, games default is 128x128, 2048x2048 seems a reasonable improvement
39+
ReflectionResolution = 2048
3840

39-
# Enable/disable Xbox Series impulse trigger vibration, or customise it
40-
# (VibrationMode must be enabled above for this to work)
41-
# 0 = disable
42-
# 1 = enable impulse triggers
43-
# 2 = ^ with L/R motors swapped (recommended for impulse triggers)
44-
# 3 = ^ with L/R motors merged together
45-
ImpulseVibrationMode = 2
41+
# Allows game to enable 4x transparency supersampling, heavily reducing aliasing on things like barriers or cloth around the track edge.
42+
# For best results use this with "DX/ANTIALIASING = 2" inside outrun2006.ini
43+
TransparencySupersampling = true
4644

47-
# Multipliers of the trigger vibration, the normal controller motor vibration is multiplied by these to set trigger value
48-
ImpulseVibrationLeftMultiplier = 0.20
49-
ImpulseVibrationRightMultiplier = 0.20
45+
# Fixes certain stage objects disappearing before they reach edge of screen, when playing at non-4:3 aspect ratio.
46+
ScreenEdgeCullFix = true
5047

51-
[Window]
52-
# Forces windowed mode to become borderless. (requires "DX/WINDOWED = 1" inside outrun2006.ini)
53-
WindowedBorderless = true
48+
# Disables LODs on vehicles, reducing the ugly pop-in they have.
49+
DisableVehicleLODs = true
5450

55-
# Only applied if WindowedBorderless is set to true.
56-
WindowPositionX = 0
57-
WindowPositionY = 0
51+
# Disables culling of certain stage objects, so most distant objects won't obviously pop in to view.
52+
DisableStageCulling = true
5853

59-
# Hides mouse cursor while game window is active.
60-
WindowedHideMouseCursor = true
54+
# Fixes Z-Buffer precision issues, greatly reducing z-fighting and distant object drawing issues (eg. signs/buildings will have much less pop-in)
55+
FixZBufferPrecision = true
6156

62-
# Disables DPI scaling on game window, can help fix issues when screen DPI is set above 100%
63-
DisableDPIScaling = true
57+
# Allows textures to be replaced if a matching texture exists inside textures\load\ folder
58+
# Textures must be named as [hash]_[width]x[height].dds, where hash/width/height comes from the original texture to be replaced
59+
# They can also be kept in seperate subfolders for the texture package the original texture belongs to, or just kept inside the base texture\load\ folder
60+
# You can find the correct filename/texture package name by enabling TextureDump below
61+
SceneTextureReplacement = true
62+
UITextureReplacement = true
6463

65-
# If the outrun2006.ini file doesn't exist, changes games default 640x480 resolution to primary display resolution instead
66-
# Otherwise the resolution from outrun2006.ini (or Config.exe tool) will be used
67-
AutoDetectResolution = true
64+
# Dumps out textures into textures\dump\ folder as the game loads them in (if a replacement texture isn't loaded)
65+
# Textures will be dumped into separate subfolders for the texture package each texture belongs to
66+
SceneTextureDump = false
67+
UITextureDump = false
6868

6969
[Audio]
7070
# Allows game to load in uncompressed WAV files instead of compressed OGG
7171
# WAV files must have the same filename as the original OGG, eg. "Sound\14_Rush_a_Difficulty_1989.wav"
72-
# Only WAV & OGG are supported by the game, other formats such as FLAC must be converted to WAV for game to use
7372
AllowUncompressedBGM = true
7473

7574
# Adds support for loading FLAC audio files
76-
# This requires AllowUncompressedBGM to be enabled to work
7775
# FLAC files must have the same filename as the original OGG, eg. "Sound\14_Rush_a_Difficulty_1989.flac"
76+
# (requires AllowUncompressedBGM to be enabled to work)
7877
AllowFLAC = true
7978

8079
[CDSwitcher]
@@ -107,46 +106,49 @@ SwitcherTitlePositionY = 450
107106
TrackNext = Back
108107
TrackPrevious = RS+Back
109108

110-
[Graphics]
111-
# Adjusts the UI scaling applied by the game
112-
# 0 = game default, stretches to screen ratio
113-
# 1 = 4:3 UI centered to middle of screen
114-
# 2 = WIP based on Outrun Online Arcade
115-
UIScalingMode = 0
109+
[Vibration]
110+
# Enable/disable the xbox vibration code, or customise it
111+
# 0 = disable
112+
# 1 = enable xbox vibration code
113+
# 2 = ^ with L/R motors swapped
114+
# 3 = ^ with L/R motors merged together
115+
VibrationMode = 1
116116

117-
# 1 - 16, 0 to leave it at games default.
118-
AnisotropicFiltering = 16
117+
# XInput device to send vibration to, default should work fine in most cases, but if you don't notice any vibration you can try increasing this here
118+
VibrationControllerId = 0
119119

120-
# Resolution used for car reflections, games default is 128x128, 2048x2048 seems a reasonable improvement
121-
ReflectionResolution = 2048
120+
# VibrationStrength range is 0 to 10
121+
VibrationStrength = 10
122122

123-
# Allows game to enable 4x transparency supersampling, heavily reducing aliasing on things like barriers or cloth around the track edge.
124-
# For best results use this with "DX/ANTIALIASING = 2" inside outrun2006.ini
125-
TransparencySupersampling = true
123+
# Enable/disable Xbox Series impulse trigger vibration, or customise it
124+
# (VibrationMode must be enabled above for this to work)
125+
# 0 = disable
126+
# 1 = enable impulse triggers
127+
# 2 = ^ with L/R motors swapped (recommended for impulse triggers)
128+
# 3 = ^ with L/R motors merged together
129+
ImpulseVibrationMode = 2
126130

127-
# Fixes certain stage objects disappearing before they reach edge of screen, when playing at non-4:3 aspect ratio.
128-
ScreenEdgeCullFix = true
131+
# Multipliers of the trigger vibration, the normal controller motor vibration is multiplied by these to set trigger value
132+
ImpulseVibrationLeftMultiplier = 0.20
133+
ImpulseVibrationRightMultiplier = 0.20
129134

130-
# Disables LODs on vehicles, reducing the ugly pop-in they have.
131-
DisableVehicleLODs = true
135+
[Window]
136+
# Forces windowed mode to become borderless. (requires "DX/WINDOWED = 1" inside outrun2006.ini)
137+
WindowedBorderless = true
132138

133-
# Disables culling of certain stage objects, so most distant objects won't obviously pop in to view.
134-
DisableStageCulling = true
139+
# Only applied if WindowedBorderless is set to true.
140+
WindowPositionX = 0
141+
WindowPositionY = 0
135142

136-
# Fixes Z-Buffer precision issues, greatly reducing z-fighting and distant object drawing issues (eg. signs/buildings will have much less pop-in)
137-
FixZBufferPrecision = true
143+
# Hides mouse cursor while game window is active.
144+
WindowedHideMouseCursor = true
138145

139-
# Allows textures to be replaced if a matching texture exists inside textures\load\ folder
140-
# Textures must be named as [hash]_[width]x[height].dds, where hash/width/height comes from the original texture to be replaced
141-
# They can also be kept in seperate subfolders for the texture package the original texture belongs to (or just kept inside the base texture\load\ folder)
142-
# You can find the correct filename/texture package name by enabling TextureDump below
143-
SceneTextureReplacement = true
144-
UITextureReplacement = true
146+
# Disables DPI scaling on game window, can help fix issues when screen DPI is set above 100%
147+
DisableDPIScaling = true
145148

146-
# Dumps out textures into textures\dump\ folder as the game loads them in, if a replacement texture isn't loaded
147-
# Textures will be dumped into separate subfolders for the texture package each texture belongs to
148-
SceneTextureDump = false
149-
UITextureDump = false
149+
# If the outrun2006.ini file doesn't exist, changes games default 640x480 resolution to primary display resolution instead
150+
# Otherwise the resolution from outrun2006.ini (or Config.exe tool) will be used
151+
AutoDetectResolution = true
150152

151153
[Misc]
152154
# Skips the beginning intro logos, saving a couple seconds from startup time. (game will still show a white screen for 5-10 seconds while data loads in)

src/hooks_graphics.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,11 @@ class UILetterboxing : public Hook
11901190
VertexBuf->Unlock();
11911191
}
11921192

1193-
if (*Game::current_mode == GameState::STATE_GAME || *Game::current_mode == GameState::STATE_SMPAUSEMENU)
1193+
bool isInGame = *Game::current_mode == GameState::STATE_GAME ||
1194+
*Game::current_mode == GameState::STATE_SMPAUSEMENU ||
1195+
(*Game::current_mode == GameState::STATE_START && *Game::game_start_progress_code == 65);
1196+
1197+
if (isInGame)
11941198
return; // disable letterboxing while in-game
11951199

11961200
// Backup existing cullmode and set to none, otherwise we won't get drawn

0 commit comments

Comments
 (0)