diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index 8a05d5f1e..39b63825f 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -161,6 +161,12 @@ void SystemData::launchGame(Window* window, FileData* game) void SystemData::populateFolder(FileData* folder) { + if (mDirectLaunch) + { + LOG(LogInfo) << "System " << mName << " is a direct launch item, not building game lists."; + return; + } + const fs::path& folderPath = folder->getPath(); if(!fs::is_directory(folderPath)) { @@ -330,12 +336,15 @@ bool SystemData::loadConfig() continue; } - //convert path to generic directory seperators - boost::filesystem::path genericPath(path); - path = genericPath.generic_string(); + if (!directLaunch) + { + //convert path to generic directory seperators + boost::filesystem::path genericPath(path); + path = genericPath.generic_string(); + } SystemData* newSys = new SystemData(name, fullname, path, extensions, cmd, platformIds, themeFolder, directLaunch); - if(newSys->getRootFolder()->getChildren().size() == 0) + if(newSys->getRootFolder()->getChildren().size() == 0 && !directLaunch) { LOG(LogWarning) << "System \"" << name << "\" has no games! Ignoring it."; delete newSys; diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 5a94d97c2..9716cfd8b 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -72,7 +72,15 @@ void ViewController::goToNextGameList() assert(mState.viewing == GAME_LIST); SystemData* system = getState().getSystem(); assert(system); - goToGameList(system->getNext()); + + // skip systems that don't have a game list, this will always end since it is called + // from a system with a game list and the iterator is cyclic + do + { + system = system->getNext(); + } while ( system->getDirectLaunch() ); + + goToGameList(system); } void ViewController::goToPrevGameList() @@ -80,7 +88,15 @@ void ViewController::goToPrevGameList() assert(mState.viewing == GAME_LIST); SystemData* system = getState().getSystem(); assert(system); - goToGameList(system->getPrev()); + + // skip systems that don't have a game list, this will always end since it is called + // from a system with a game list and the iterator is cyclic + do + { + system = system->getPrev(); + } while ( system->getDirectLaunch() ); + + goToGameList(system); } void ViewController::goToGameList(SystemData* system) diff --git a/es-app/src/views/gamelist/BasicGameListView.cpp b/es-app/src/views/gamelist/BasicGameListView.cpp index af4ccbfe4..e0facdd20 100644 --- a/es-app/src/views/gamelist/BasicGameListView.cpp +++ b/es-app/src/views/gamelist/BasicGameListView.cpp @@ -38,6 +38,12 @@ void BasicGameListView::onFileChanged(FileData* file, FileChangeType change) void BasicGameListView::populateList(const std::vector& files) { mList.clear(); + + // file list can be empty if direct launch item + if (files.size()==0) + { + return; + } mHeaderText.setText(files.at(0)->getSystem()->getFullName());