Skip to content

Commit

Permalink
Emscripten: Do not show ".." on error screen. Other platforms: Fix re…
Browse files Browse the repository at this point in the history
…ndering of ".." on error screen.
  • Loading branch information
Ghabry committed Apr 1, 2024
1 parent ebdd6c8 commit 9403f41
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/window_gamelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 9403f41

Please sign in to comment.