Skip to content

Commit 2020f38

Browse files
committed
Replicate in Generals
1 parent 770751a commit 2020f38

File tree

1 file changed

+11
-5
lines changed
  • Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus

1 file changed

+11
-5
lines changed

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,8 @@ static OptionPreferences *pref = NULL;
922922

923923
static void setDefaults( void )
924924
{
925+
constexpr const Bool ModifyDisplaySettings = FALSE;
926+
925927
//-------------------------------------------------------------------------------------------------
926928
// provider type
927929
// GadgetCheckBoxSetChecked(checkAudioHardware, FALSE);
@@ -938,6 +940,8 @@ static void setDefaults( void )
938940
// send Delay
939941
GadgetCheckBoxSetChecked(checkSendDelay, FALSE);
940942

943+
if constexpr (ModifyDisplaySettings)
944+
{
941945
//-------------------------------------------------------------------------------------------------
942946
// LOD
943947
if ((TheGameLogic->isInGame() == FALSE) || (TheGameLogic->isInShellGame() == TRUE))
@@ -961,7 +965,7 @@ static void setDefaults( void )
961965
}
962966
GadgetComboBoxSetSelectedPos( comboBoxResolution, defaultResIndex ); //should be 800x600 (our lowest supported mode)
963967
}
964-
968+
}
965969

966970
//-------------------------------------------------------------------------------------------------
967971
// Mouse Mode
@@ -996,12 +1000,13 @@ static void setDefaults( void )
9961000
GadgetSliderGetMinMax(sliderGamma,&valMin, &valMax);
9971001
GadgetSliderSetPosition(sliderGamma, ((valMax - valMin) / 2 + valMin));
9981002

999-
//-------------------------------------------------------------------------------------------------
1000-
// Texture resolution slider
1001-
//
1002-
1003+
if constexpr (ModifyDisplaySettings)
1004+
{
10031005
if ((TheGameLogic->isInGame() == FALSE) || (TheGameLogic->isInShellGame() == TRUE))
10041006
{
1007+
//-------------------------------------------------------------------------------------------------
1008+
// Texture resolution slider
1009+
//
10051010
Int txtFact=TheGameLODManager->getRecommendedTextureReduction();
10061011

10071012
GadgetSliderSetPosition( sliderTextureResolution, 2-txtFact);
@@ -1061,6 +1066,7 @@ static void setDefaults( void )
10611066
//
10621067
GadgetCheckBoxSetChecked( checkProps, TheGlobalData->m_useTrees);
10631068
}
1069+
}
10641070
}
10651071

10661072
static void saveOptions( void )

0 commit comments

Comments
 (0)