Skip to content

Commit 1a24b49

Browse files
committed
Emscripten: Do not show ".." on error screen. Other platforms: Fix rendering of ".." on error screen.
1 parent ebdd6c8 commit 1a24b49

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/scene_gamebrowser.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ void Scene_GameBrowser::CreateWindows() {
105105
command_window->DisableItem(0);
106106
}
107107

108+
#ifdef EMSCRIPTEN
109+
command_window->DisableItem(0);
110+
#endif
111+
108112
help_window = std::make_unique<Window_Help>(0, 0, Player::screen_width, 32);
109113
help_window->SetText("EasyRPG Player - RPG Maker 2000/2003 interpreter");
110114

src/window_gamelist.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ bool Window_GameList::Refresh(FilesystemView filesystem_base, bool show_dotdot)
8484
}
8585
}
8686
else {
87+
#ifdef EMSCRIPTEN
88+
show_dotdot = false;
89+
#endif
90+
8791
item_max = 1;
8892

8993
SetContents(Bitmap::Create(width - 16, height - 16));
@@ -102,12 +106,7 @@ void Window_GameList::DrawItem(int index) {
102106
Rect rect = GetItemRect(index);
103107
contents->ClearRect(rect);
104108

105-
StringView text;
106-
107-
if (HasValidEntry()) {
108-
text = game_directories[index].GetReadableName();
109-
}
110-
109+
StringView text = game_directories[index].GetReadableName();
111110
contents->TextDraw(rect.x, rect.y, Font::ColorDefault, text);
112111
}
113112

0 commit comments

Comments
 (0)