@@ -688,25 +688,31 @@ static bool InstallDownloadedGraphicsOverride(const LauncherPaths& paths, const
688688 bool replacedAny = false ;
689689 if (probeResult.leftWidth != 0 && probeResult.leftHeight != 0 ) {
690690 struct BetterVRPresetPlaceholder {
691+ const char * nameToken;
691692 const char * widthToken;
692693 const char * heightToken;
693694 double multiplier;
694- const char * label ;
695+ const char * multiplierLabel ;
695696 };
696697
697698 static constexpr BetterVRPresetPlaceholder PresetPlaceholders[] = {
698- { " __BETTERVR_05_WIDTH__" , " __BETTERVR_05_HEIGHT__" , 0.5 , " 0.5x" },
699- { " __BETTERVR_10_WIDTH__" , " __BETTERVR_10_HEIGHT__" , 1.0 , " 1x" },
700- { " __BETTERVR_20_WIDTH__" , " __BETTERVR_20_HEIGHT__" , 2.0 , " 2x" },
701- { " __BETTERVR_30_WIDTH__" , " __BETTERVR_30_HEIGHT__" , 3.0 , " 3x" },
702- { " __BETTERVR_40_WIDTH__" , " __BETTERVR_40_HEIGHT__" , 4.0 , " 4x" },
699+ { " __BETTERVR_05_NAME__" , " __BETTERVR_05_WIDTH__" , " __BETTERVR_05_HEIGHT__" , 0.5 , " 0.5x" },
700+ { " __BETTERVR_10_NAME__" , " __BETTERVR_10_WIDTH__" , " __BETTERVR_10_HEIGHT__" , 1.0 , " 1x" },
701+ { " __BETTERVR_15_NAME__" , " __BETTERVR_15_WIDTH__" , " __BETTERVR_15_HEIGHT__" , 1.5 , " 1.5x" },
702+ { " __BETTERVR_20_NAME__" , " __BETTERVR_20_WIDTH__" , " __BETTERVR_20_HEIGHT__" , 2.0 , " 2x" },
703+ { " __BETTERVR_30_NAME__" , " __BETTERVR_30_WIDTH__" , " __BETTERVR_30_HEIGHT__" , 3.0 , " 3x" },
704+ { " __BETTERVR_40_NAME__" , " __BETTERVR_40_WIDTH__" , " __BETTERVR_40_HEIGHT__" , 4.0 , " 4x" },
703705 };
704706
705707 for (const BetterVRPresetPlaceholder& preset : PresetPlaceholders) {
706708 const std::pair<uint32_t , uint32_t > adjustedResolution = GetNearestRulesCompatibleEyeResolution (double (probeResult.leftWidth ) * preset.multiplier , double (probeResult.leftHeight ) * preset.multiplier );
707- LogLine (" Adjusted BetterVR " + std::string (preset.label ) + " resolution: " + std::to_string (adjustedResolution.first ) + " x" + std::to_string (adjustedResolution.second ));
708- replacedAny |= ReplaceTextToken (contents, preset.widthToken , std::to_string (adjustedResolution.first ));
709- replacedAny |= ReplaceTextToken (contents, preset.heightToken , std::to_string (adjustedResolution.second ));
709+ const std::string adjustedWidth = std::to_string (adjustedResolution.first );
710+ const std::string adjustedHeight = std::to_string (adjustedResolution.second );
711+ const std::string resolutionLabel = adjustedWidth + " x" + adjustedHeight;
712+ LogLine (" Adjusted BetterVR " + std::string (preset.multiplierLabel ) + " resolution: " + resolutionLabel);
713+ replacedAny |= ReplaceTextToken (contents, preset.nameToken , resolutionLabel);
714+ replacedAny |= ReplaceTextToken (contents, preset.widthToken , adjustedWidth);
715+ replacedAny |= ReplaceTextToken (contents, preset.heightToken , adjustedHeight);
710716 }
711717 }
712718
0 commit comments