From 3f3f3e835bd1101b74e4ec02ac95c122df6e7438 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Wed, 24 Sep 2025 19:32:49 +0200 Subject: [PATCH 1/2] tweak(gamelod): Simplify game detail setup for options menu --- .../Code/GameEngine/Include/Common/GameLOD.h | 2 +- .../Code/GameEngine/Source/Common/GameLOD.cpp | 10 +- .../GUI/GUICallbacks/Menus/OptionsMenu.cpp | 102 +++--------------- .../GUI/GUICallbacks/Menus/ScoreScreen.cpp | 4 +- .../W3DDevice/GameClient/W3DDisplay.cpp | 4 +- 5 files changed, 26 insertions(+), 96 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GameLOD.h b/GeneralsMD/Code/GameEngine/Include/Common/GameLOD.h index 0ae0e8e200..cccbee0311 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GameLOD.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GameLOD.h @@ -164,7 +164,7 @@ class GameLODManager const char *getStaticGameLODLevelName(StaticGameLODLevel level); const char *getDynamicGameLODLevelName(DynamicGameLODLevel level); - StaticGameLODLevel findStaticLODLevel(void); ///< calculate the optimal static LOD level for this system. + StaticGameLODLevel getRecommendedStaticLODLevel(void); ///< calculate the optimal static LOD level for this system. Bool setStaticLODLevel(StaticGameLODLevel level); ///< set the current static LOD level. StaticGameLODLevel getStaticLODLevel(void) { return m_currentStaticLOD;} DynamicGameLODLevel findDynamicLODLevel(Real averageFPS); ///= STATIC_GAME_LOD_COUNT) - return m_staticGameLODInfo[STATIC_GAME_LOD_LOW].m_textureReduction; + return getLevelTextureReduction(STATIC_GAME_LOD_LOW); - return m_staticGameLODInfo[m_idealDetailLevel].m_textureReduction; + return getLevelTextureReduction(m_idealDetailLevel); } Int GameLODManager::getLevelTextureReduction(StaticGameLODLevel level) diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp index e5b8b02a00..6962e61b98 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp @@ -217,14 +217,6 @@ extern void DoResolutionDialog(); static Bool ignoreSelected = FALSE; WindowLayout *OptionsLayout = NULL; -enum Detail CPP_11(: Int) -{ - HIGHDETAIL = 0, - MEDIUMDETAIL, - LOWDETAIL, - CUSTOMDETAIL, -}; - OptionPreferences::OptionPreferences( void ) { @@ -990,25 +982,9 @@ static void setDefaults( void ) //------------------------------------------------------------------------------------------------- // LOD - if ((TheGameLogic->isInGame() == FALSE) || (TheGameLogic->isInShellGame() == TRUE)) { - StaticGameLODLevel level=TheGameLODManager->findStaticLODLevel(); - switch (level) - { - case STATIC_GAME_LOD_LOW: - GadgetComboBoxSetSelectedPos(comboBoxDetail, LOWDETAIL); - break; - case STATIC_GAME_LOD_MEDIUM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, MEDIUMDETAIL); - break; - case STATIC_GAME_LOD_HIGH: - GadgetComboBoxSetSelectedPos(comboBoxDetail, HIGHDETAIL); - break; - case STATIC_GAME_LOD_CUSTOM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, CUSTOMDETAIL); - break; - default: - DEBUG_ASSERTCRASH(FALSE,("Tried to set comboBoxDetail to a value of %d ", TheGameLODManager->getStaticLODLevel()) ); - }; + if ((TheGameLogic->isInGame() == FALSE) || (TheGameLogic->isInShellGame() == TRUE)) + { + GadgetComboBoxSetSelectedPos(comboBoxDetail, (Int)TheGameLODManager->getRecommendedStaticLODLevel()); } //------------------------------------------------------------------------------------------------- @@ -1182,7 +1158,7 @@ static void saveOptions( void ) //------------------------------------------------------------------------------------------------- // Custom game detail settings. GadgetComboBoxGetSelectedPos( comboBoxDetail, &index ); - if (index == CUSTOMDETAIL) + if (index == STATIC_GAME_LOD_CUSTOM) { //------------------------------------------------------------------------------------------------- // Texture resolution slider @@ -1254,27 +1230,8 @@ static void saveOptions( void ) // LOD if (comboBoxDetail && comboBoxDetail->winGetEnabled()) { - Bool levelChanged=FALSE; GadgetComboBoxGetSelectedPos( comboBoxDetail, &index ); - - //The levels stored by the LOD Manager are inverted compared to GUI so find correct one: - switch (index) { - case HIGHDETAIL: - levelChanged=TheGameLODManager->setStaticLODLevel(STATIC_GAME_LOD_HIGH); - break; - case MEDIUMDETAIL: - levelChanged=TheGameLODManager->setStaticLODLevel(STATIC_GAME_LOD_MEDIUM); - break; - case LOWDETAIL: - levelChanged=TheGameLODManager->setStaticLODLevel(STATIC_GAME_LOD_LOW); - break; - case CUSTOMDETAIL: - levelChanged=TheGameLODManager->setStaticLODLevel(STATIC_GAME_LOD_CUSTOM); - break; - default: - DEBUG_ASSERTCRASH(FALSE,("LOD passed in was %d, %d is not a supported LOD",index,index)); - break; - } + const Bool levelChanged = TheGameLODManager->setStaticLODLevel((StaticGameLODLevel)index); if (levelChanged) (*pref)["StaticGameLOD"] = TheGameLODManager->getStaticGameLODLevelName(TheGameLODManager->getStaticLODLevel()); @@ -1627,23 +1584,7 @@ static void acceptAdvancedOptions() static void cancelAdvancedOptions() { //restore the detail selection back to initial state - switch (TheGameLODManager->getStaticLODLevel()) - { - case STATIC_GAME_LOD_LOW: - GadgetComboBoxSetSelectedPos(comboBoxDetail, LOWDETAIL); - break; - case STATIC_GAME_LOD_MEDIUM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, MEDIUMDETAIL); - break; - case STATIC_GAME_LOD_HIGH: - GadgetComboBoxSetSelectedPos(comboBoxDetail, HIGHDETAIL); - break; - case STATIC_GAME_LOD_CUSTOM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, CUSTOMDETAIL); - break; - default: - DEBUG_ASSERTCRASH(FALSE,("Tried to set comboBoxDetail to a value of %d ", TheGameLODManager->getStaticLODLevel()) ); - }; + GadgetComboBoxSetSelectedPos(comboBoxDetail, (Int)TheGameLODManager->getStaticLODLevel()); WinAdvancedDisplay->winHide(TRUE); } @@ -1961,35 +1902,22 @@ void OptionsMenuInit( WindowLayout *layout, void *userData ) GadgetComboBoxSetSelectedPos( comboBoxResolution, selectedResIndex ); // set the display detail + // TheSuperHackers @tweak xezon 24/09/2025 The Detail Combo Box now has the same value order as StaticGameLODLevel for simplicity. GadgetComboBoxReset(comboBoxDetail); - GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:High"), color); - GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:Medium"), color); GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:Low"), color); + GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:Medium"), color); + GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:High"), color); GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:Custom"), color); + static_assert(STATIC_GAME_LOD_COUNT == 4, "Wrong combo box count"); //Check if level was never set and default to setting most suitable for system. if (TheGameLODManager->getStaticLODLevel() == STATIC_GAME_LOD_UNKNOWN) - TheGameLODManager->setStaticLODLevel(TheGameLODManager->findStaticLODLevel()); - - switch (TheGameLODManager->getStaticLODLevel()) - { - case STATIC_GAME_LOD_LOW: - GadgetComboBoxSetSelectedPos(comboBoxDetail, LOWDETAIL); - break; - case STATIC_GAME_LOD_MEDIUM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, MEDIUMDETAIL); - break; - case STATIC_GAME_LOD_HIGH: - GadgetComboBoxSetSelectedPos(comboBoxDetail, HIGHDETAIL); - break; - case STATIC_GAME_LOD_CUSTOM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, CUSTOMDETAIL); - break; - default: - DEBUG_ASSERTCRASH(FALSE,("Tried to set comboBoxDetail to a value of %d ", TheGameLODManager->getStaticLODLevel()) ); - }; + { + TheGameLODManager->setStaticLODLevel(TheGameLODManager->getRecommendedStaticLODLevel()); + } Int txtFact=TheGameLODManager->getCurrentTextureReduction(); + GadgetComboBoxSetSelectedPos(comboBoxDetail, (Int)TheGameLODManager->getStaticLODLevel()); GadgetSliderSetPosition( sliderTextureResolution, 2-txtFact); @@ -2310,7 +2238,7 @@ WindowMsgHandledType OptionsMenuSystem( GameWindow *window, UnsignedInt msg, { Int index; GadgetComboBoxGetSelectedPos( comboBoxDetail, &index ); - if(index != CUSTOMDETAIL) + if(index != STATIC_GAME_LOD_CUSTOM) break; showAdvancedOptions(); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp index 565057302c..7d824b2dae 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp @@ -900,7 +900,7 @@ void finishSinglePlayerInit( void ) if (!TheGameLODManager->didMemPass()) { useLowRes = TRUE; } - if (TheGameLODManager->findStaticLODLevel()==STATIC_GAME_LOD_LOW) { + if (TheGameLODManager->getRecommendedStaticLODLevel()==STATIC_GAME_LOD_LOW) { useLowRes = TRUE; } if (TheGameLODManager->getStaticLODLevel()==STATIC_GAME_LOD_LOW) { @@ -1980,7 +1980,7 @@ winName.format("ScoreScreen.wnd:StaticTextScore%d", pos); stats.surrenders[ptIdx] += TheGameInfo->haveWeSurrendered() || !TheVictoryConditions->getEndFrame(); AsciiString systemSpec; - systemSpec.format("LOD%d", TheGameLODManager->findStaticLODLevel()); + systemSpec.format("LOD%d", TheGameLODManager->getRecommendedStaticLODLevel()); stats.systemSpec = systemSpec.str(); stats.techCaptured[ptIdx] += s->getTotalTechBuildingsCaptured(); diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp index 0a9acb08a1..517eb95a90 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp @@ -791,7 +791,9 @@ void W3DDisplay::init( void ) //Check if level was never set and default to setting most suitable for system. if (TheGameLODManager->getStaticLODLevel() == STATIC_GAME_LOD_UNKNOWN) - TheGameLODManager->setStaticLODLevel(TheGameLODManager->findStaticLODLevel()); + { + TheGameLODManager->setStaticLODLevel(TheGameLODManager->getRecommendedStaticLODLevel()); + } else { //Static LOD level was applied during GameLOD manager init except for texture reduction //which needs to be applied here. From 06854ba6898cb7d89b1fc2aefe3c78386b9b393a Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Sat, 11 Oct 2025 13:24:03 +0200 Subject: [PATCH 2/2] Replicate in Generals --- .../Code/GameEngine/Include/Common/GameLOD.h | 2 +- .../Code/GameEngine/Source/Common/GameLOD.cpp | 10 +- .../GUI/GUICallbacks/Menus/OptionsMenu.cpp | 102 +++--------------- .../GUI/GUICallbacks/Menus/ScoreScreen.cpp | 4 +- .../W3DDevice/GameClient/W3DDisplay.cpp | 4 +- 5 files changed, 26 insertions(+), 96 deletions(-) diff --git a/Generals/Code/GameEngine/Include/Common/GameLOD.h b/Generals/Code/GameEngine/Include/Common/GameLOD.h index 2d08f9f161..d19246a18b 100644 --- a/Generals/Code/GameEngine/Include/Common/GameLOD.h +++ b/Generals/Code/GameEngine/Include/Common/GameLOD.h @@ -163,7 +163,7 @@ class GameLODManager const char *getStaticGameLODLevelName(StaticGameLODLevel level); const char *getDynamicGameLODLevelName(DynamicGameLODLevel level); - StaticGameLODLevel findStaticLODLevel(void); ///< calculate the optimal static LOD level for this system. + StaticGameLODLevel getRecommendedStaticLODLevel(void); ///< calculate the optimal static LOD level for this system. Bool setStaticLODLevel(StaticGameLODLevel level); ///< set the current static LOD level. StaticGameLODLevel getStaticLODLevel(void) { return m_currentStaticLOD;} DynamicGameLODLevel findDynamicLODLevel(Real averageFPS); ///= STATIC_GAME_LOD_COUNT) - return m_staticGameLODInfo[STATIC_GAME_LOD_LOW].m_textureReduction; + return getLevelTextureReduction(STATIC_GAME_LOD_LOW); - return m_staticGameLODInfo[m_idealDetailLevel].m_textureReduction; + return getLevelTextureReduction(m_idealDetailLevel); } Int GameLODManager::getLevelTextureReduction(StaticGameLODLevel level) diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp index 839748ac39..7f9755f105 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp @@ -208,14 +208,6 @@ extern void DoResolutionDialog(); static Bool ignoreSelected = FALSE; WindowLayout *OptionsLayout = NULL; -enum Detail CPP_11(: Int) -{ - HIGHDETAIL = 0, - MEDIUMDETAIL, - LOWDETAIL, - CUSTOMDETAIL, -}; - OptionPreferences::OptionPreferences( void ) { @@ -946,25 +938,9 @@ static void setDefaults( void ) //------------------------------------------------------------------------------------------------- // LOD - if ((TheGameLogic->isInGame() == FALSE) || (TheGameLogic->isInShellGame() == TRUE)) { - TheGameLODManager->setStaticLODLevel(TheGameLODManager->findStaticLODLevel()); - switch (TheGameLODManager->getStaticLODLevel()) - { - case STATIC_GAME_LOD_LOW: - GadgetComboBoxSetSelectedPos(comboBoxDetail, LOWDETAIL); - break; - case STATIC_GAME_LOD_MEDIUM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, MEDIUMDETAIL); - break; - case STATIC_GAME_LOD_HIGH: - GadgetComboBoxSetSelectedPos(comboBoxDetail, HIGHDETAIL); - break; - case STATIC_GAME_LOD_CUSTOM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, CUSTOMDETAIL); - break; - default: - DEBUG_ASSERTCRASH(FALSE,("Tried to set comboBoxDetail to a value of %d ", TheGameLODManager->getStaticLODLevel()) ); - }; + if ((TheGameLogic->isInGame() == FALSE) || (TheGameLogic->isInShellGame() == TRUE)) + { + GadgetComboBoxSetSelectedPos(comboBoxDetail, (Int)TheGameLODManager->getRecommendedStaticLODLevel()); } //------------------------------------------------------------------------------------------------- @@ -1131,7 +1107,7 @@ static void saveOptions( void ) //------------------------------------------------------------------------------------------------- // Custom game detail settings. GadgetComboBoxGetSelectedPos( comboBoxDetail, &index ); - if (index == CUSTOMDETAIL) + if (index == STATIC_GAME_LOD_CUSTOM) { //------------------------------------------------------------------------------------------------- // Texture resolution slider @@ -1200,27 +1176,8 @@ static void saveOptions( void ) // LOD if (comboBoxDetail && comboBoxDetail->winGetEnabled()) { - Bool levelChanged=FALSE; GadgetComboBoxGetSelectedPos( comboBoxDetail, &index ); - - //The levels stored by the LOD Manager are inverted compared to GUI so find correct one: - switch (index) { - case HIGHDETAIL: - levelChanged=TheGameLODManager->setStaticLODLevel(STATIC_GAME_LOD_HIGH); - break; - case MEDIUMDETAIL: - levelChanged=TheGameLODManager->setStaticLODLevel(STATIC_GAME_LOD_MEDIUM); - break; - case LOWDETAIL: - levelChanged=TheGameLODManager->setStaticLODLevel(STATIC_GAME_LOD_LOW); - break; - case CUSTOMDETAIL: - levelChanged=TheGameLODManager->setStaticLODLevel(STATIC_GAME_LOD_CUSTOM); - break; - default: - DEBUG_ASSERTCRASH(FALSE,("LOD passed in was %d, %d is not a supported LOD",index,index)); - break; - } + const Bool levelChanged = TheGameLODManager->setStaticLODLevel((StaticGameLODLevel)index); if (levelChanged) (*pref)["StaticGameLOD"] = TheGameLODManager->getStaticGameLODLevelName(TheGameLODManager->getStaticLODLevel()); @@ -1567,23 +1524,7 @@ static void acceptAdvancedOptions() static void cancelAdvancedOptions() { //restore the detail selection back to initial state - switch (TheGameLODManager->getStaticLODLevel()) - { - case STATIC_GAME_LOD_LOW: - GadgetComboBoxSetSelectedPos(comboBoxDetail, LOWDETAIL); - break; - case STATIC_GAME_LOD_MEDIUM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, MEDIUMDETAIL); - break; - case STATIC_GAME_LOD_HIGH: - GadgetComboBoxSetSelectedPos(comboBoxDetail, HIGHDETAIL); - break; - case STATIC_GAME_LOD_CUSTOM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, CUSTOMDETAIL); - break; - default: - DEBUG_ASSERTCRASH(FALSE,("Tried to set comboBoxDetail to a value of %d ", TheGameLODManager->getStaticLODLevel()) ); - }; + GadgetComboBoxSetSelectedPos(comboBoxDetail, (Int)TheGameLODManager->getStaticLODLevel()); WinAdvancedDisplay->winHide(TRUE); } @@ -1894,35 +1835,22 @@ void OptionsMenuInit( WindowLayout *layout, void *userData ) GadgetComboBoxSetSelectedPos( comboBoxResolution, selectedResIndex ); // set the display detail + // TheSuperHackers @tweak xezon 24/09/2025 The Detail Combo Box now has the same value order as StaticGameLODLevel for simplicity. GadgetComboBoxReset(comboBoxDetail); - GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:High"), color); - GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:Medium"), color); GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:Low"), color); + GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:Medium"), color); + GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:High"), color); GadgetComboBoxAddEntry(comboBoxDetail, TheGameText->fetch("GUI:Custom"), color); + static_assert(STATIC_GAME_LOD_COUNT == 4, "Wrong combo box count"); //Check if level was never set and default to setting most suitable for system. if (TheGameLODManager->getStaticLODLevel() == STATIC_GAME_LOD_UNKNOWN) - TheGameLODManager->setStaticLODLevel(TheGameLODManager->findStaticLODLevel()); - - switch (TheGameLODManager->getStaticLODLevel()) - { - case STATIC_GAME_LOD_LOW: - GadgetComboBoxSetSelectedPos(comboBoxDetail, LOWDETAIL); - break; - case STATIC_GAME_LOD_MEDIUM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, MEDIUMDETAIL); - break; - case STATIC_GAME_LOD_HIGH: - GadgetComboBoxSetSelectedPos(comboBoxDetail, HIGHDETAIL); - break; - case STATIC_GAME_LOD_CUSTOM: - GadgetComboBoxSetSelectedPos(comboBoxDetail, CUSTOMDETAIL); - break; - default: - DEBUG_ASSERTCRASH(FALSE,("Tried to set comboBoxDetail to a value of %d ", TheGameLODManager->getStaticLODLevel()) ); - }; + { + TheGameLODManager->setStaticLODLevel(TheGameLODManager->getRecommendedStaticLODLevel()); + } Int txtFact=TheGameLODManager->getCurrentTextureReduction(); + GadgetComboBoxSetSelectedPos(comboBoxDetail, (Int)TheGameLODManager->getStaticLODLevel()); GadgetSliderSetPosition( sliderTextureResolution, 2-txtFact); @@ -2239,7 +2167,7 @@ WindowMsgHandledType OptionsMenuSystem( GameWindow *window, UnsignedInt msg, { Int index; GadgetComboBoxGetSelectedPos( comboBoxDetail, &index ); - if(index != CUSTOMDETAIL) + if(index != STATIC_GAME_LOD_CUSTOM) break; showAdvancedOptions(); diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp index f154eb9e7b..69fac1c830 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp @@ -741,7 +741,7 @@ void finishSinglePlayerInit( void ) if (!TheGameLODManager->didMemPass()) { useLowRes = TRUE; } - if (TheGameLODManager->findStaticLODLevel()==STATIC_GAME_LOD_LOW) { + if (TheGameLODManager->getRecommendedStaticLODLevel()==STATIC_GAME_LOD_LOW) { useLowRes = TRUE; } if (TheGameLODManager->getStaticLODLevel()==STATIC_GAME_LOD_LOW) { @@ -1715,7 +1715,7 @@ winName.format("ScoreScreen.wnd:StaticTextScore%d", pos); stats.surrenders[ptIdx] += TheGameInfo->haveWeSurrendered() || !TheVictoryConditions->getEndFrame(); AsciiString systemSpec; - systemSpec.format("LOD%d", TheGameLODManager->findStaticLODLevel()); + systemSpec.format("LOD%d", TheGameLODManager->getRecommendedStaticLODLevel()); stats.systemSpec = systemSpec.str(); stats.techCaptured[ptIdx] += s->getTotalTechBuildingsCaptured(); diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp index 07d9519107..1c64f1e530 100644 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp +++ b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp @@ -741,7 +741,9 @@ void W3DDisplay::init( void ) //Check if level was never set and default to setting most suitable for system. if (TheGameLODManager->getStaticLODLevel() == STATIC_GAME_LOD_UNKNOWN) - TheGameLODManager->setStaticLODLevel(TheGameLODManager->findStaticLODLevel()); + { + TheGameLODManager->setStaticLODLevel(TheGameLODManager->getRecommendedStaticLODLevel()); + } else { //Static LOD level was applied during GameLOD manager init except for texture reduction //which needs to be applied here.