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 1a24b49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/scene_gamebrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ void Scene_GameBrowser::CreateWindows() {
command_window->DisableItem(0);
}

#ifdef EMSCRIPTEN
command_window->DisableItem(0);
#endif

help_window = std::make_unique<Window_Help>(0, 0, Player::screen_width, 32);
help_window->SetText("EasyRPG Player - RPG Maker 2000/2003 interpreter");

Expand Down
11 changes: 5 additions & 6 deletions src/window_gamelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ bool Window_GameList::Refresh(FilesystemView filesystem_base, bool show_dotdot)
}
}
else {
#ifdef EMSCRIPTEN
show_dotdot = false;
#endif

item_max = 1;

SetContents(Bitmap::Create(width - 16, height - 16));
Expand All @@ -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 1a24b49

Please sign in to comment.