From 44fe7038277fb334366b8c42bcd490f9a60eab7f Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sun, 24 Aug 2025 16:05:41 +0200 Subject: [PATCH] Use correct string types in SettingsWindow --- apps/openmw/mwgui/settingswindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index 1d638f56e9..749b68a874 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -46,7 +46,7 @@ namespace { - std::string textureFilteringToStr(const std::string& mipFilter, const std::string& magFilter) + std::string_view textureFilteringToStr(const std::string& mipFilter, const std::string& magFilter) { if (mipFilter == "none") return "#{OMWEngine:TextureFilteringDisabled}"; @@ -65,9 +65,9 @@ namespace return "#{OMWEngine:TextureFilteringOther}"; } - std::string lightingMethodToStr(SceneUtil::LightingMethod method) + MyGUI::UString lightingMethodToStr(SceneUtil::LightingMethod method) { - std::string result; + std::string_view result; switch (method) { case SceneUtil::LightingMethod::FFP: @@ -82,7 +82,7 @@ namespace break; } - return MyGUI::LanguageManager::getInstance().replaceTags(result); + return MyGUI::LanguageManager::getInstance().replaceTags(MyGUI::UString(result)); } bool sortResolutions(std::pair left, std::pair right) @@ -840,7 +840,7 @@ namespace MWGui void SettingsWindow::updateLightSettings() { auto lightingMethod = MWBase::Environment::get().getResourceSystem()->getSceneManager()->getLightingMethod(); - std::string lightingMethodStr = lightingMethodToStr(lightingMethod); + MyGUI::UString lightingMethodStr = lightingMethodToStr(lightingMethod); mLightingMethodButton->removeAllItems();