From 9403f41146a46ffa9154520670baba8fa2c90bed Mon Sep 17 00:00:00 2001 From: Ghabry Date: Mon, 1 Apr 2024 20:52:30 +0200 Subject: [PATCH] Emscripten: Do not show ".." on error screen. Other platforms: Fix rendering of ".." on error screen. --- src/window_gamelist.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/window_gamelist.cpp b/src/window_gamelist.cpp index 35c89d7af49..ec07146cc90 100644 --- a/src/window_gamelist.cpp +++ b/src/window_gamelist.cpp @@ -34,6 +34,10 @@ bool Window_GameList::Refresh(FilesystemView filesystem_base, bool show_dotdot) return false; } +#ifdef EMSCRIPTEN + show_dotdot = false; +#endif + game_directories.clear(); this->show_dotdot = show_dotdot; @@ -102,12 +106,7 @@ void Window_GameList::DrawItem(int index) { Rect rect = GetItemRect(index); contents->ClearRect(rect); - StringView text; - - if (HasValidEntry()) { - text = game_directories[index].GetReadableName(); - } - + StringView text = game_directories[index].GetReadableName(); contents->TextDraw(rect.x, rect.y, Font::ColorDefault, text); }