From 35aac59bd8a2fb9f9fa2a424d9e8d2a1d1528071 Mon Sep 17 00:00:00 2001 From: w3irDv <170813473+w3irDv@users.noreply.github.com> Date: Sat, 27 Jul 2024 11:13:19 +0200 Subject: [PATCH] eliminate duplicate check on allowUsedSpaceTxtUpdate --- source/menu/GameBrowseMenu.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/menu/GameBrowseMenu.cpp b/source/menu/GameBrowseMenu.cpp index e95addf6..a4e7bef0 100644 --- a/source/menu/GameBrowseMenu.cpp +++ b/source/menu/GameBrowseMenu.cpp @@ -1693,13 +1693,12 @@ void GameBrowseMenu::UpdateCallback(void * e) void GameBrowseMenu::SetFreeSpace(float freespace, float used) { - if (strcmp(Settings.db_language, "JA") == 0) { - if ( allowUsedSpaceTxtUpdate == true ) + if ( allowUsedSpaceTxtUpdate == true ) { + if (strcmp(Settings.db_language, "JA") == 0) usedSpaceTxt->SetText(fmt("%.2fGB %s %.2fGB %s", freespace + used, tr( "of" ), freespace, tr( "free" ))); - } - else - if ( allowUsedSpaceTxtUpdate == true ) + else usedSpaceTxt->SetText(fmt("%.2fGB %s %.2fGB %s", freespace, tr( "of" ), freespace + used, tr( "free" ))); + } } void GameBrowseMenu::UpdateFreeSpace(void * arg)