From c9955ad810bec5d2a22814451ec4ac320f325f1a Mon Sep 17 00:00:00 2001 From: Lyall Stamper Date: Wed, 11 Sep 2024 22:18:53 +0100 Subject: [PATCH] Fix log spam. #55 This is what you get making commits in the middle of the night. --- src/dllmain.cpp | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/src/dllmain.cpp b/src/dllmain.cpp index fde43cb..b9da253 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -25,7 +25,7 @@ HMODULE baseModule = GetModuleHandle(NULL); // Version std::string sFixName = "SMTVFix"; -std::string sFixVer = "0.9.8a"; +std::string sFixVer = "0.9.8b"; std::string sLogFile = sFixName + ".log"; // Logger @@ -247,11 +247,6 @@ void Logging() void ReadConfig() { - // Log some messages - for (int i = 0; i < 1000000000; ++i) { - logger->info("This is log message number {}", i); - } - // Initialise config std::ifstream iniFile(sExePath.string() + sConfigFile); if (!iniFile) { @@ -951,7 +946,7 @@ void GraphicalTweaks() if (bScreenPercentage && ScreenPercentageCVAR->GetFloat() != fScreenPercentage) { ScreenPercentageCVAR->Set(std::to_wstring(fScreenPercentage).c_str()); - ScreenPercentageCVAR->SetFlags(SDK::ECVF_SetByCode); + ScreenPercentageCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.ScreenPercentage to {}", ScreenPercentageCVAR->GetFloat()); } @@ -961,7 +956,7 @@ void GraphicalTweaks() if (AntiAliasingCVAR && AntiAliasingCVAR->GetInt() != 2) { AntiAliasingCVAR->Set(L"2"); - AntiAliasingCVAR->SetFlags(SDK::ECVF_SetByCode); + AntiAliasingCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.DefaultFeature.AntiAliasing to {}", AntiAliasingCVAR->GetInt()); } @@ -969,7 +964,7 @@ void GraphicalTweaks() if (VertexMotionVectorsCVAR && VertexMotionVectorsCVAR->GetInt() != 1) { VertexMotionVectorsCVAR->Set(L"1"); - VertexMotionVectorsCVAR->SetFlags(SDK::ECVF_SetByCode); + VertexMotionVectorsCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.VertexDeformationOutputsVelocity to {}", VertexMotionVectorsCVAR->GetInt()); } @@ -977,7 +972,7 @@ void GraphicalTweaks() if (HalfResAOCVAR && HalfResAOCVAR->GetInt() != 0) { HalfResAOCVAR->Set(L"0"); - HalfResAOCVAR->SetFlags(SDK::ECVF_SetByCode); + HalfResAOCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.AmbientOcclusion.HalfRes to {}", HalfResAOCVAR->GetInt()); } @@ -987,7 +982,7 @@ void GraphicalTweaks() if (TAAUAlgorithmCVAR && TAAUAlgorithmCVAR->GetInt() != 1) { TAAUAlgorithmCVAR->Set(L"1"); - TAAUAlgorithmCVAR->SetFlags(SDK::ECVF_SetByCode); + TAAUAlgorithmCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.TemporalAA.Algorithm to {}", TAAUAlgorithmCVAR->GetInt()); } } @@ -999,7 +994,7 @@ void GraphicalTweaks() if (AOMethodCVAR && AOMethodCVAR->GetInt() != 1) { AOMethodCVAR->Set(L"1"); - AOMethodCVAR->SetFlags(SDK::ECVF_SetByCode); + AOMethodCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.AmbientOcclusion.Method to {}", AOMethodCVAR->GetInt()); } @@ -1009,7 +1004,7 @@ void GraphicalTweaks() if (HalfResGTAOCVAR && HalfResGTAOCVAR->GetInt() != 1) { HalfResGTAOCVAR->Set(L"1"); - HalfResGTAOCVAR->SetFlags(SDK::ECVF_SetByCode); + HalfResGTAOCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.GTAO.Downsample to {}", HalfResGTAOCVAR->GetInt()); } } @@ -1021,7 +1016,7 @@ void GraphicalTweaks() if (FoliageDistanceCVAR && FoliageDistanceCVAR->GetFloat() != fFoliageDistanceScale) { FoliageDistanceCVAR->Set(std::to_wstring(fFoliageDistanceScale).c_str()); - FoliageDistanceCVAR->SetFlags(SDK::ECVF_SetByCode); + FoliageDistanceCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set foliage.LODDistanceScale to {}", FoliageDistanceCVAR->GetFloat()); } @@ -1029,7 +1024,7 @@ void GraphicalTweaks() if (ViewDistanceCVAR && ViewDistanceCVAR->GetFloat() != fViewDistanceScale) { ViewDistanceCVAR->Set(std::to_wstring(fViewDistanceScale).c_str()); - ViewDistanceCVAR->SetFlags(SDK::ECVF_SetByCode); + ViewDistanceCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.ViewDistanceScale to {}", ViewDistanceCVAR->GetFloat()); } @@ -1037,7 +1032,7 @@ void GraphicalTweaks() if (SkeletalMeshLODBiasCVAR && SkeletalMeshLODBiasCVAR->GetInt() != -1) { SkeletalMeshLODBiasCVAR->Set(L"-1"); - SkeletalMeshLODBiasCVAR->SetFlags(SDK::ECVF_SetByCode); + SkeletalMeshLODBiasCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.SkeletalMeshLODBias to {}", SkeletalMeshLODBiasCVAR->GetInt()); } } @@ -1048,7 +1043,7 @@ void GraphicalTweaks() if (SSAOLevelsCVAR && SSAOLevelsCVAR->GetInt() != iSSAOLevel) { SSAOLevelsCVAR->Set(std::to_wstring(iSSAOLevel).c_str()); - SSAOLevelsCVAR->SetFlags(SDK::ECVF_SetByCode); + SSAOLevelsCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.AmbientOcclusionLevels to {}", SSAOLevelsCVAR->GetInt()); } } @@ -1059,7 +1054,7 @@ void GraphicalTweaks() if (SSGIEnableCVAR && SSGIEnableCVAR->GetInt() != 1) { SSGIEnableCVAR->Set(L"1"); - SSGIEnableCVAR->SetFlags(SDK::ECVF_SetByCode); + SSGIEnableCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.SSGI.Enable to {}", SSGIEnableCVAR->GetInt()); } @@ -1067,7 +1062,7 @@ void GraphicalTweaks() if (SSGIQualityCVAR && SSGIQualityCVAR->GetInt() != iSSGIQuality) { SSGIQualityCVAR->Set(std::to_wstring(iSSGIQuality).c_str()); - SSGIQualityCVAR->SetFlags(SDK::ECVF_SetByCode); + SSGIQualityCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.SSGI.Quality to {}", SSGIQualityCVAR->GetInt()); } @@ -1077,7 +1072,7 @@ void GraphicalTweaks() if (SSGIHalfResCVAR && SSGIHalfResCVAR->GetInt() != 1) { SSGIHalfResCVAR->Set(L"1"); - SSGIHalfResCVAR->SetFlags(SDK::ECVF_SetByCode); + SSGIHalfResCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.SSGI.HalfRes to {}", SSGIHalfResCVAR->GetInt()); } } @@ -1089,7 +1084,7 @@ void GraphicalTweaks() if (TonemapperQualityCVAR && TonemapperQualityCVAR->GetInt() != 0) { TonemapperQualityCVAR->Set(L"0"); - TonemapperQualityCVAR->SetFlags(SDK::ECVF_SetByCode); + TonemapperQualityCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.Tonemapper.Quality to {}", TonemapperQualityCVAR->GetInt()); } } @@ -1100,7 +1095,7 @@ void GraphicalTweaks() if (UROEnableCVAR && UROEnableCVAR->GetInt() != 0) { UROEnableCVAR->Set(L"0"); - UROEnableCVAR->SetFlags(SDK::ECVF_SetByCode); + UROEnableCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set a.URO.Enable to {}", UROEnableCVAR->GetInt()); } } @@ -1111,7 +1106,7 @@ void GraphicalTweaks() if (MaxShadowCSMResolutionCVAR && MaxShadowCSMResolutionCVAR->GetInt() != iShadowResolution) { MaxShadowCSMResolutionCVAR->Set(std::to_wstring(iShadowResolution).c_str()); - MaxShadowCSMResolutionCVAR->SetFlags(SDK::ECVF_SetByCode); + MaxShadowCSMResolutionCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.Shadow.MaxCSMResolution to {}", MaxShadowCSMResolutionCVAR->GetInt()); } @@ -1119,7 +1114,7 @@ void GraphicalTweaks() if (MaxShadowResolutionCVAR && MaxShadowResolutionCVAR->GetInt() != iShadowResolution) { MaxShadowResolutionCVAR->Set(std::to_wstring(iShadowResolution).c_str()); - MaxShadowResolutionCVAR->SetFlags(SDK::ECVF_SetByCode); + MaxShadowResolutionCVAR->SetFlags(SDK::ECVF_SetByConstructor); spdlog::info("Set CVARS: Set r.Shadow.MaxResolution to {}", MaxShadowResolutionCVAR->GetInt()); } }