diff --git a/src/scene_gamebrowser.cpp b/src/scene_gamebrowser.cpp index 77be95d7490..dbbe272b886 100644 --- a/src/scene_gamebrowser.cpp +++ b/src/scene_gamebrowser.cpp @@ -115,6 +115,18 @@ void Scene_GameBrowser::CreateWindows() { about_window = std::make_unique(0, 64, Player::screen_width, Player::screen_height - 64); about_window->Refresh(); about_window->SetVisible(false); + + // Output::Warning("conditions {} - {}", gamelist_window->max_directories, gamelist_window->last_directory_name); + if (gamelist_window->max_directories == 1 && gamelist_window->last_directory_name.find("gamedata.easyrpg") != -1) { + + command_window->SetVisible(false); + gamelist_window->SetVisible(false); + help_window->SetVisible(false); + load_window->SetVisible(true); + + gamelist_window->SetIndex(old_gamelist_index); + game_loading = true; + } } void Scene_GameBrowser::UpdateCommand() { diff --git a/src/window_gamelist.cpp b/src/window_gamelist.cpp index eec944888be..a89b1f6b3f5 100644 --- a/src/window_gamelist.cpp +++ b/src/window_gamelist.cpp @@ -75,6 +75,8 @@ bool Window_GameList::Refresh(FilesystemView filesystem_base, bool show_dotdot) if (HasValidEntry()) { item_max = game_directories.size(); + max_directories = item_max; + last_directory_name = Utils::LowerCase(game_directories[item_max - 1]); CreateContents(); diff --git a/src/window_gamelist.h b/src/window_gamelist.h index a3809c6f860..4c16c3c560d 100644 --- a/src/window_gamelist.h +++ b/src/window_gamelist.h @@ -59,6 +59,9 @@ class Window_GameList : public Window_Selectable { */ std::pair GetGameFilesystem() const; + int max_directories; + std::string last_directory_name; + private: FilesystemView base_fs; std::vector game_directories;