Skip to content

Commit 22399c2

Browse files
committed
FullscreenUI: Fix localization of 'None' background
1 parent e6788b3 commit 22399c2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/core/fullscreen_ui.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ static bool CompileTransitionPipelines();
229229
//////////////////////////////////////////////////////////////////////////
230230

231231
static constexpr const char* DEFAULT_BACKGROUND_NAME = "StaticGray";
232+
static constexpr const char* NONE_BACKGROUND_NAME = "None";
232233

233234
static bool HasBackground();
234235
static void LoadBackground();
@@ -1929,7 +1930,7 @@ ChoiceDialogOptions FullscreenUI::GetBackgroundOptions(const TinyString& current
19291930
static constexpr const char* dir = FS_OSPATH_SEPARATOR_STR "fullscreenui" FS_OSPATH_SEPARATOR_STR "backgrounds";
19301931

19311932
ChoiceDialogOptions options;
1932-
options.emplace_back(FSUI_STR("None"), current_value == "None");
1933+
options.emplace_back(FSUI_STR("None"), (current_value == NONE_BACKGROUND_NAME));
19331934

19341935
FileSystem::FindResultsArray results;
19351936
FileSystem::FindFiles(Path::Combine(EmuFolders::UserResources, dir).c_str(), "*",
@@ -4168,7 +4169,7 @@ void FullscreenUI::DrawInterfaceSettingsPage()
41684169
MenuButtonWithValue(FSUI_ICONVSTR(ICON_FA_IMAGE, "Menu Background"),
41694170
FSUI_VSTR("Shows a background image or shader when a game isn't running. Backgrounds are "
41704171
"located in resources/fullscreenui/backgrounds in the data directory."),
4171-
current_value.c_str()))
4172+
(current_value == NONE_BACKGROUND_NAME) ? FSUI_VSTR("None") : current_value.view()))
41724173
{
41734174
ChoiceDialogOptions options = GetBackgroundOptions(current_value);
41744175
OpenChoiceDialog(FSUI_ICONVSTR(ICON_FA_IMAGE, "Menu Background"), false, std::move(options),
@@ -4177,7 +4178,8 @@ void FullscreenUI::DrawInterfaceSettingsPage()
41774178
return;
41784179

41794180
SettingsInterface* bsi = GetEditingSettingsInterface();
4180-
bsi->SetStringValue("Main", "FullscreenUIBackground", (index == 0) ? "None" : title.c_str());
4181+
bsi->SetStringValue("Main", "FullscreenUIBackground",
4182+
(index == 0) ? NONE_BACKGROUND_NAME : title.c_str());
41814183
SetSettingsChanged(bsi);
41824184

41834185
// Have to defer the reload, because we've already drawn the bg for this frame.

0 commit comments

Comments
 (0)