Skip to content

Commit 566e9e9

Browse files
committed
Disable DirectDraw-related and compatibility options in Vinifera builds
1 parent c31231f commit 566e9e9

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/sun.ini.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,21 @@ void LoadSunIni()
3232
SetMultiProcAffinity();
3333

3434
VideoBackBuffer = SunIni_GetBool("Video", "VideoBackBuffer", true);
35+
UsePNG = SunIni_GetBool("Video", "UsePNG", UsePNG);
36+
ScrollDelay = SunIni_GetInt("Options", "ScrollDelay", 0);
37+
38+
#ifndef VINIFERA
3539
NoWindowFrame = SunIni_GetBool("Video", "NoWindowFrame", false);
3640
UseGraphicsPatch = SunIni_GetBool("Video", "UseGraphicsPatch", true);
3741
VideoWindowed = SunIni_GetBool("Video", "Video.Windowed", false);
38-
ScrollDelay = SunIni_GetInt("Options", "ScrollDelay", 0);
3942
ForceConversionType4 = SunIni_GetBool("Video", "ForceConversionType4", true);
40-
UsePNG = SunIni_GetBool("Video", "UsePNG", UsePNG);
43+
#else // VINIFERA
44+
NoWindowFrame = false;
45+
UseGraphicsPatch = false;
46+
ForceConversionType4 = false;
47+
#endif // VINIFERA
4148

49+
#ifndef VINIFERA
4250
if (SunIni_GetBool("Video", "DisableHighDpiScaling", false))
4351
DisableHighDpiScaling();
4452
if (SunIni_GetBool("Video", "DisableMaxWindowedMode", true))
@@ -78,15 +86,18 @@ void LoadSunIni()
7886
{
7987
*ThreadSafe = true;
8088
}
89+
#endif // VINIFERA
8190

8291
MouseIntervalResolution = SunIni_GetInt("Video", "MouseResolution", 1);
8392
MouseRenderInterval = SunIni_GetInt("Video", "MouseRenderInterval", 8);
8493

8594
#ifndef SINGLEPLAYER
8695

96+
#ifndef VINIFERA
8797
bool *handleClose = (bool *)GetProcAddress(hDDraw, "GameHandlesClose");
8898
if (handleClose)
8999
*handleClose = true;
100+
#endif // VINIFERA
90101

91102
if (OverrideColors = SunIni_GetBool("Options","OverrideColors",false))
92103
ApplyUserColorOverrides();
@@ -110,5 +121,5 @@ void LoadSunIni()
110121
DoubleTapInterval = SunIni_GetInt("Options", "DoubleTapInterval", -1);
111122
AltToRally = SunIni_GetBool("Options", "AltToRally", false);
112123
AddTeamStyle2 = SunIni_GetBool("Options", "AddTeamStyle2", false);
113-
#endif
124+
#endif // SINGLEPLAYER
114125
}

0 commit comments

Comments
 (0)