From c7964b7ebc480fb73d596b9dbfa483d6b43578b6 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 15 Jan 2022 13:38:09 +0100 Subject: [PATCH] Renamed GameList to Gamelist throughout the codebase. --- es-app/CMakeLists.txt | 24 ++--- es-app/src/CollectionSystemsManager.cpp | 48 ++++----- es-app/src/SystemData.cpp | 8 +- es-app/src/SystemScreensaver.cpp | 14 +-- es-app/src/guis/GuiGamelistOptions.cpp | 32 +++--- es-app/src/guis/GuiGamelistOptions.h | 4 +- es-app/src/guis/GuiMenu.cpp | 4 +- es-app/src/guis/GuiMetaDataEd.cpp | 4 +- es-app/src/guis/GuiSettings.cpp | 4 +- es-app/src/scrapers/GamesDBJSONScraper.cpp | 2 +- es-app/src/scrapers/GamesDBJSONScraper.h | 2 +- es-app/src/scrapers/ScreenScraper.h | 4 +- es-app/src/views/SystemView.cpp | 2 +- es-app/src/views/ViewController.cpp | 102 +++++++++--------- es-app/src/views/ViewController.h | 28 ++--- ...GameListView.cpp => BasicGamelistView.cpp} | 36 +++---- ...asicGameListView.h => BasicGamelistView.h} | 12 +-- ...eListView.cpp => DetailedGamelistView.cpp} | 32 +++--- ...dGameListView.h => DetailedGamelistView.h} | 10 +- ...dGameListView.cpp => GridGamelistView.cpp} | 58 +++++----- ...{GridGameListView.h => GridGamelistView.h} | 14 +-- .../{IGameListView.cpp => IGamelistView.cpp} | 20 ++-- .../{IGameListView.h => IGamelistView.h} | 14 +-- ...meListView.cpp => ISimpleGamelistView.cpp} | 42 ++++---- ...leGameListView.h => ISimpleGamelistView.h} | 12 +-- ...GameListView.cpp => VideoGamelistView.cpp} | 34 +++--- ...ideoGameListView.h => VideoGamelistView.h} | 12 +-- es-core/src/components/GridTileComponent.cpp | 2 +- es-core/src/components/GridTileComponent.h | 2 +- es-core/src/components/ImageGridComponent.h | 2 +- es-core/src/renderers/Renderer_GL21.cpp | 2 +- 31 files changed, 293 insertions(+), 293 deletions(-) rename es-app/src/views/gamelist/{BasicGameListView.cpp => BasicGamelistView.cpp} (92%) rename es-app/src/views/gamelist/{BasicGameListView.h => BasicGamelistView.h} (87%) rename es-app/src/views/gamelist/{DetailedGameListView.cpp => DetailedGamelistView.cpp} (96%) rename es-app/src/views/gamelist/{DetailedGameListView.h => DetailedGamelistView.h} (87%) rename es-app/src/views/gamelist/{GridGameListView.cpp => GridGamelistView.cpp} (94%) rename es-app/src/views/gamelist/{GridGameListView.h => GridGamelistView.h} (91%) rename es-app/src/views/gamelist/{IGameListView.cpp => IGamelistView.cpp} (76%) rename es-app/src/views/gamelist/{IGameListView.h => IGamelistView.h} (84%) rename es-app/src/views/gamelist/{ISimpleGameListView.cpp => ISimpleGamelistView.cpp} (95%) rename es-app/src/views/gamelist/{ISimpleGameListView.h => ISimpleGamelistView.h} (89%) rename es-app/src/views/gamelist/{VideoGameListView.cpp => VideoGamelistView.cpp} (96%) rename es-app/src/views/gamelist/{VideoGameListView.h => VideoGamelistView.h} (87%) diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index dd7645e42..29dce3d03 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -48,12 +48,12 @@ set(ES_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/ScreenScraper.h # Views - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/VideoGameListView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGamelistView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGamelistView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGamelistView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGamelistView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGamelistView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/VideoGamelistView.h ${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.h ${CMAKE_CURRENT_SOURCE_DIR}/src/views/UIModeController.h ${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.h @@ -98,12 +98,12 @@ set(ES_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/ScreenScraper.cpp # Views - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/VideoGameListView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGamelistView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGamelistView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGamelistView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGamelistView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGamelistView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/VideoGamelistView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/views/UIModeController.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.cpp diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index 1f35ea5c3..331d2959d 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -33,7 +33,7 @@ #include "utils/TimeUtil.h" #include "views/UIModeController.h" #include "views/ViewController.h" -#include "views/gamelist/IGameListView.h" +#include "views/gamelist/IGamelistView.h" #include #include @@ -265,7 +265,7 @@ void CollectionSystemsManager::updateSystemsList() for (auto sysIt = SystemData::sSystemVector.cbegin(); // Line break. sysIt != SystemData::sSystemVector.cend(); ++sysIt) { if ((*sysIt)->isCollection()) - ViewController::getInstance()->getGameListView((*sysIt)); + ViewController::getInstance()->getGamelistView((*sysIt)); } // If we were editing a custom collection, and it's no longer enabled, exit edit mode. @@ -345,13 +345,13 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection // Found it, and we are removing it. if (name == "favorites" && file->metadata.get("favorite") == "false") { // Need to check if it is still marked as favorite, if not remove it. - ViewController::getInstance()->getGameListView(curSys).get()->remove( + ViewController::getInstance()->getGamelistView(curSys).get()->remove( collectionEntry, false); } else if (name == "recent" && file->metadata.get("lastplayed") == "0") { // If lastplayed is set to 0 it means the entry has been cleared, and the // game should therefore be removed. - ViewController::getInstance()->getGameListView(curSys).get()->remove( + ViewController::getInstance()->getGamelistView(curSys).get()->remove( collectionEntry, false); ViewController::getInstance()->onFileChanged(rootFolder, true); } @@ -359,7 +359,7 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection // If the countasgame flag has been set to false, then remove the game. if (curSys->isGroupedCustomCollection()) { ViewController::getInstance() - ->getGameListView(curSys->getRootFolder()->getParent()->getSystem()) + ->getGamelistView(curSys->getRootFolder()->getParent()->getSystem()) .get() ->remove(collectionEntry, false); FileData* parentRootFolder = @@ -375,7 +375,7 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection 4000); } else { - ViewController::getInstance()->getGameListView(curSys).get()->remove( + ViewController::getInstance()->getGamelistView(curSys).get()->remove( collectionEntry, false); } rootFolder->sort(rootFolder->getSortTypeFromString(rootFolder->getSortTypeString()), @@ -403,7 +403,7 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection CollectionFileData* newGame = new CollectionFileData(file, curSys); rootFolder->addChild(newGame); fileIndex->addToIndex(newGame); - ViewController::getInstance()->getGameListView(curSys)->onFileChanged(newGame, + ViewController::getInstance()->getGamelistView(curSys)->onFileChanged(newGame, true); } } @@ -451,8 +451,8 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection auto nTime = Utils::Time::now(); if (nTime - Utils::Time::stringToTime(file->metadata.get("lastplayed")) < 2) { // Select the first row of the gamelist (the game just played). - IGameListView* gameList = ViewController::getInstance() - ->getGameListView(getSystemToView(sysData.system)) + IGamelistView* gameList = ViewController::getInstance() + ->getGamelistView(getSystemToView(sysData.system)) .get(); gameList->setCursor(gameList->getFirstEntry()); } @@ -492,7 +492,7 @@ void CollectionSystemsManager::deleteCollectionFiles(FileData* file) FileData* collectionEntry = children.at(key); SystemData* systemViewToUpdate = getSystemToView(sysDataIt->second.system); ViewController::getInstance() - ->getGameListView(systemViewToUpdate) + ->getGamelistView(systemViewToUpdate) .get() ->remove(collectionEntry, false); if (sysDataIt->second.decl.isCustom) @@ -626,8 +626,8 @@ void CollectionSystemsManager::exitEditMode(bool showPopup) // Remove all tick marks from the games that are part of the collection. for (auto it = SystemData::sSystemVector.begin(); it != SystemData::sSystemVector.end(); ++it) { - ViewController::getInstance()->getGameListView((*it))->onFileChanged( - ViewController::getInstance()->getGameListView((*it))->getCursor(), false); + ViewController::getInstance()->getGamelistView((*it))->onFileChanged( + ViewController::getInstance()->getGamelistView((*it))->getCursor(), false); } mEditingCollectionSystemData->system->onMetaDataSavePoint(); @@ -673,13 +673,13 @@ const bool CollectionSystemsManager::toggleGameInCollection(FileData* file) FileData* collectionEntry = children.at(key); fileIndex->removeFromIndex(collectionEntry); ViewController::getInstance() - ->getGameListView(systemViewToUpdate) + ->getGamelistView(systemViewToUpdate) .get() ->remove(collectionEntry, false); systemViewToUpdate->getRootFolder()->sort( rootFolder->getSortTypeFromString(rootFolder->getSortTypeString()), Settings::getInstance()->getBool("FavFirstCustom")); - ViewController::getInstance()->reloadGameListView(systemViewToUpdate); + ViewController::getInstance()->reloadGamelistView(systemViewToUpdate); updateCollectionFolderMetadata(systemViewToUpdate); } @@ -719,7 +719,7 @@ const bool CollectionSystemsManager::toggleGameInCollection(FileData* file) file->getSourceFileData()->getSystem()->onMetaDataSavePoint(); refreshCollectionSystems(file->getSourceFileData()); if (mAutoCollectionSystemsData["favorites"].isEnabled) - ViewController::getInstance()->reloadGameListView( + ViewController::getInstance()->reloadGamelistView( mAutoCollectionSystemsData["favorites"].system); } if (adding) { @@ -917,7 +917,7 @@ void CollectionSystemsManager::deleteCustomCollection(const std::string& collect CollectionSystemsManager::getInstance()->loadEnabledListFromSettings(); CollectionSystemsManager::getInstance()->updateSystemsList(); - ViewController::getInstance()->removeGameListView(collectionEntry->second.system); + ViewController::getInstance()->removeGamelistView(collectionEntry->second.system); ViewController::getInstance()->reloadAll(); delete collectionEntry->second.system; @@ -1006,7 +1006,7 @@ void CollectionSystemsManager::repopulateCollection(SystemData* sysData) // and then point to this, and for collections with games in them we select the first // entry. auto autoView = - ViewController::getInstance()->getGameListView(autoSystem->system).get(); + ViewController::getInstance()->getGamelistView(autoSystem->system).get(); if (autoSystem->system->getRootFolder()->getChildren().size() == 0) { autoView->addPlaceholder(autoSystem->system->getRootFolder()); autoView->setCursor(autoView->getLastEntry()); @@ -1043,7 +1043,7 @@ void CollectionSystemsManager::repopulateCollection(SystemData* sysData) populateCustomCollection(customSystem); auto autoView = - ViewController::getInstance()->getGameListView(customSystem->system).get(); + ViewController::getInstance()->getGamelistView(customSystem->system).get(); autoView->setCursor( customSystem->system->getRootFolder()->getChildrenRecursive().front()); autoView->setCursor(autoView->getFirstEntry()); @@ -1163,13 +1163,13 @@ void CollectionSystemsManager::populateAutoCollection(CollectionSystemData* sysD // The following is needed to avoid a crash when repopulating the system as the previous // cursor pointer may point to a random memory address. auto recentGamelist = - ViewController::getInstance()->getGameListView(rootFolder->getSystem()).get(); + ViewController::getInstance()->getGamelistView(rootFolder->getSystem()).get(); recentGamelist->setCursor( rootFolder->getSystem()->getRootFolder()->getChildrenRecursive().front()); recentGamelist->setCursor(recentGamelist->getFirstEntry()); if (rootFolder->getChildren().size() > 0) ViewController::getInstance() - ->getGameListView(rootFolder->getSystem()) + ->getGamelistView(rootFolder->getSystem()) .get() ->onFileChanged(rootFolder->getChildren().front(), false); } @@ -1257,7 +1257,7 @@ void CollectionSystemsManager::removeCollectionsFromDisplayedSystems() // Clear index. mCustomCollectionsBundle->getIndex()->resetIndex(); // Remove view so it's re-created as needed. - ViewController::getInstance()->removeGameListView(mCustomCollectionsBundle); + ViewController::getInstance()->removeGamelistView(mCustomCollectionsBundle); } void CollectionSystemsManager::addEnabledCollectionsToDisplayedSystems( @@ -1288,8 +1288,8 @@ void CollectionSystemsManager::addEnabledCollectionsToDisplayedSystems( rootFolder->getSortTypeFromString(rootFolder->getSortTypeString()), Settings::getInstance()->getBool("FavFirstCustom")); // Jump to the first row of the game list, assuming it's not empty. - IGameListView* gameList = - ViewController::getInstance()->getGameListView((it->second.system)).get(); + IGamelistView* gameList = + ViewController::getInstance()->getGamelistView((it->second.system)).get(); if (!gameList->getCursor()->isPlaceHolder()) { gameList->setCursor(gameList->getFirstEntry()); } @@ -1443,7 +1443,7 @@ void CollectionSystemsManager::trimCollectionCount(FileData* rootFolder, int lim while (static_cast(rootFolder->getChildrenListToDisplay().size()) > limit) { CollectionFileData* gameToRemove = (CollectionFileData*)rootFolder->getChildrenListToDisplay().back(); - ViewController::getInstance()->getGameListView(curSys).get()->remove(gameToRemove, false); + ViewController::getInstance()->getGamelistView(curSys).get()->remove(gameToRemove, false); } } diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index f2aed2aa2..6cb200a3f 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -23,7 +23,7 @@ #include "utils/StringUtil.h" #include "views/UIModeController.h" #include "views/ViewController.h" -#include "views/gamelist/IGameListView.h" +#include "views/gamelist/IGamelistView.h" #include #include @@ -1127,7 +1127,7 @@ FileData* SystemData::getRandomGame(const FileData* currentGame) } else { gameList = ViewController::getInstance() - ->getGameListView(mRootFolder->getSystem()) + ->getGamelistView(mRootFolder->getSystem()) .get() ->getCursor() ->getParent() @@ -1209,10 +1209,10 @@ void SystemData::sortSystem(bool reloadGamelist, bool jumpToFirstRow) favoritesSorting); if (reloadGamelist) - ViewController::getInstance()->reloadGameListView(this, false); + ViewController::getInstance()->reloadGamelistView(this, false); if (jumpToFirstRow) { - IGameListView* gameList = ViewController::getInstance()->getGameListView(this).get(); + IGamelistView* gameList = ViewController::getInstance()->getGamelistView(this).get(); gameList->setCursor(gameList->getFirstEntry()); } } diff --git a/es-app/src/SystemScreensaver.cpp b/es-app/src/SystemScreensaver.cpp index cf1e1fba1..10a7ae5f7 100644 --- a/es-app/src/SystemScreensaver.cpp +++ b/es-app/src/SystemScreensaver.cpp @@ -17,7 +17,7 @@ #include "utils/FileSystemUtil.h" #include "utils/StringUtil.h" #include "views/ViewController.h" -#include "views/gamelist/IGameListView.h" +#include "views/gamelist/IGamelistView.h" #include #include @@ -210,9 +210,9 @@ void SystemScreensaver::launchGame() if (mCurrentGame != nullptr) { // Launching game ViewController::getInstance()->triggerGameLaunch(mCurrentGame); - ViewController::getInstance()->goToGameList(mCurrentGame->getSystem()); - IGameListView* view = - ViewController::getInstance()->getGameListView(mCurrentGame->getSystem()).get(); + ViewController::getInstance()->goToGamelist(mCurrentGame->getSystem()); + IGamelistView* view = + ViewController::getInstance()->getGamelistView(mCurrentGame->getSystem()).get(); view->setCursor(mCurrentGame); ViewController::getInstance()->cancelViewTransitions(); } @@ -222,9 +222,9 @@ void SystemScreensaver::goToGame() { if (mCurrentGame != nullptr) { // Go to the game in the gamelist view, but don't launch it. - ViewController::getInstance()->goToGameList(mCurrentGame->getSystem()); - IGameListView* view = - ViewController::getInstance()->getGameListView(mCurrentGame->getSystem()).get(); + ViewController::getInstance()->goToGamelist(mCurrentGame->getSystem()); + IGamelistView* view = + ViewController::getInstance()->getGamelistView(mCurrentGame->getSystem()).get(); view->setCursor(mCurrentGame); ViewController::getInstance()->cancelViewTransitions(); } diff --git a/es-app/src/guis/GuiGamelistOptions.cpp b/es-app/src/guis/GuiGamelistOptions.cpp index c24bd782a..159e93706 100644 --- a/es-app/src/guis/GuiGamelistOptions.cpp +++ b/es-app/src/guis/GuiGamelistOptions.cpp @@ -23,7 +23,7 @@ #include "scrapers/Scraper.h" #include "views/UIModeController.h" #include "views/ViewController.h" -#include "views/gamelist/IGameListView.h" +#include "views/gamelist/IGamelistView.h" GuiGamelistOptions::GuiGamelistOptions(Window* window, SystemData* system) : GuiComponent(window) @@ -262,16 +262,16 @@ GuiGamelistOptions::~GuiGamelistOptions() if (mFiltersChanged) { if (!mCustomCollectionSystem) { - ViewController::getInstance()->reloadGameListView(mSystem); + ViewController::getInstance()->reloadGamelistView(mSystem); } else { if (!mFromPlaceholder) { - ViewController::getInstance()->reloadGameListView(mSystem); + ViewController::getInstance()->reloadGamelistView(mSystem); } else if (!mCustomCollectionSystem->getRootFolder() ->getChildrenListToDisplay() .empty()) { - ViewController::getInstance()->reloadGameListView(mSystem); + ViewController::getInstance()->reloadGamelistView(mSystem); getGamelist()->setCursor( mCustomCollectionSystem->getRootFolder()->getChildrenListToDisplay().front()); } @@ -353,8 +353,8 @@ void GuiGamelistOptions::startEditMode() // currently being edited. This is done cheaply using onFileChanged() which will trigger // populateList(). for (auto it = SystemData::sSystemVector.begin(); it != SystemData::sSystemVector.end(); ++it) { - ViewController::getInstance()->getGameListView((*it))->onFileChanged( - ViewController::getInstance()->getGameListView((*it))->getCursor(), false); + ViewController::getInstance()->getGamelistView((*it))->onFileChanged( + ViewController::getInstance()->getGamelistView((*it))->getCursor(), false); } if (mSystem->getRootFolder()->getChildren().size() == 0) @@ -396,7 +396,7 @@ void GuiGamelistOptions::openMetaDataEd() LOG(LogInfo) << "Deleting the media files and gamelist.xml entry for the file \"" << file->getFullPath() << "\""; } - ViewController::getInstance()->getGameListView(file->getSystem()).get()->removeMedia(file); + ViewController::getInstance()->getGamelistView(file->getSystem()).get()->removeMedia(file); // Manually reset all the metadata values, set the name to the actual file/folder name. const std::vector& mdd = file->metadata.getMDD(); @@ -443,10 +443,10 @@ void GuiGamelistOptions::openMetaDataEd() LOG(LogInfo) << "Deleting the game file \"" << file->getFullPath() << "\", all its media files and its gamelist.xml entry."; CollectionSystemsManager::getInstance()->deleteCollectionFiles(file); - ViewController::getInstance()->getGameListView(file->getSystem()).get()->removeMedia(file); - ViewController::getInstance()->getGameListView(file->getSystem()).get()->remove(file, true); + ViewController::getInstance()->getGamelistView(file->getSystem()).get()->removeMedia(file); + ViewController::getInstance()->getGamelistView(file->getSystem()).get()->remove(file, true); mSystem->getRootFolder()->sort(*mListSort->getSelected(), mFavoritesSorting); - ViewController::getInstance()->reloadGameListView(mSystem); + ViewController::getInstance()->reloadGamelistView(mSystem); mWindow->invalidateCachedBackground(); }; @@ -454,16 +454,16 @@ void GuiGamelistOptions::openMetaDataEd() if (file->getType() == FOLDER) { mWindow->pushGui(new GuiMetaDataEd( mWindow, &file->metadata, file->metadata.getMDD(FOLDER_METADATA), p, - std::bind(&IGameListView::onFileChanged, - ViewController::getInstance()->getGameListView(file->getSystem()).get(), file, + std::bind(&IGamelistView::onFileChanged, + ViewController::getInstance()->getGamelistView(file->getSystem()).get(), file, true), clearGameBtnFunc, deleteGameBtnFunc)); } else { mWindow->pushGui(new GuiMetaDataEd( mWindow, &file->metadata, file->metadata.getMDD(GAME_METADATA), p, - std::bind(&IGameListView::onFileChanged, - ViewController::getInstance()->getGameListView(file->getSystem()).get(), file, + std::bind(&IGamelistView::onFileChanged, + ViewController::getInstance()->getGamelistView(file->getSystem()).get(), file, true), clearGameBtnFunc, deleteGameBtnFunc)); } @@ -566,7 +566,7 @@ std::vector GuiGamelistOptions::getHelpPrompts() return prompts; } -IGameListView* GuiGamelistOptions::getGamelist() +IGamelistView* GuiGamelistOptions::getGamelist() { - return ViewController::getInstance()->getGameListView(mSystem).get(); + return ViewController::getInstance()->getGamelistView(mSystem).get(); } diff --git a/es-app/src/guis/GuiGamelistOptions.h b/es-app/src/guis/GuiGamelistOptions.h index bb81cd19b..dc96b3236 100644 --- a/es-app/src/guis/GuiGamelistOptions.h +++ b/es-app/src/guis/GuiGamelistOptions.h @@ -19,7 +19,7 @@ #include "components/OptionListComponent.h" #include "utils/StringUtil.h" -class IGameListView; +class IGamelistView; class SystemData; class GuiGamelistOptions : public GuiComponent @@ -50,7 +50,7 @@ private: std::shared_ptr mListSort; SystemData* mSystem; - IGameListView* getGamelist(); + IGamelistView* getGamelist(); bool mFoldersOnTop; bool mFavoritesSorting; bool mOnlyHasFolders; diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 8f7060432..0c931d893 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -35,7 +35,7 @@ #include "utils/PlatformUtil.h" #include "views/UIModeController.h" #include "views/ViewController.h" -#include "views/gamelist/IGameListView.h" +#include "views/gamelist/IGamelistView.h" #include #include @@ -129,7 +129,7 @@ void GuiMenu::openUIOptions() } }); - // GameList view style. + // Gamelist view style. auto gamelist_view_style = std::make_shared>( mWindow, getHelpStyle(), "GAMELIST VIEW STYLE", false); std::string selectedViewStyle = Settings::getInstance()->getString("GamelistViewStyle"); diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index 5e77a26ea..7cf1fb963 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -715,7 +715,7 @@ void GuiMetaDataEd::save() if (std::find(children.begin(), children.end(), hideGame) != children.end()) { sys->getIndex()->removeFromIndex(hideGame); // Reload the gamelist as well as the view style may need to change. - ViewController::getInstance()->reloadGameListView(sys); + ViewController::getInstance()->reloadGamelistView(sys); } } } @@ -844,7 +844,7 @@ void GuiMetaDataEd::close() // until the user scrolls up and down the gamelist. TextureResource::manualUnload(mScraperParams.game->getImagePath(), false); TextureResource::manualUnload(mScraperParams.game->getMarqueePath(), false); - ViewController::getInstance()->reloadGameListView(mScraperParams.system); + ViewController::getInstance()->reloadGamelistView(mScraperParams.system); // Update all collections where the game is present. CollectionSystemsManager::getInstance()->refreshCollectionSystems(mScraperParams.game); mWindow->invalidateCachedBackground(); diff --git a/es-app/src/guis/GuiSettings.cpp b/es-app/src/guis/GuiSettings.cpp index 31f90de9b..1debd3e1a 100644 --- a/es-app/src/guis/GuiSettings.cpp +++ b/es-app/src/guis/GuiSettings.cpp @@ -19,7 +19,7 @@ #include "guis/GuiTextEditKeyboardPopup.h" #include "guis/GuiTextEditPopup.h" #include "views/ViewController.h" -#include "views/gamelist/IGameListView.h" +#include "views/gamelist/IGamelistView.h" GuiSettings::GuiSettings(Window* window, std::string title) : GuiComponent(window) @@ -77,7 +77,7 @@ void GuiSettings::save() (*it)->sortSystem(true); // Jump to the first row of the gamelist. - IGameListView* gameList = ViewController::getInstance()->getGameListView((*it)).get(); + IGamelistView* gameList = ViewController::getInstance()->getGamelistView((*it)).get(); gameList->setCursor(gameList->getFirstEntry()); } } diff --git a/es-app/src/scrapers/GamesDBJSONScraper.cpp b/es-app/src/scrapers/GamesDBJSONScraper.cpp index 64a3464d1..6f9e87089 100644 --- a/es-app/src/scrapers/GamesDBJSONScraper.cpp +++ b/es-app/src/scrapers/GamesDBJSONScraper.cpp @@ -185,7 +185,7 @@ void thegamesdb_generate_json_scraper_requests( } if (usingGameID) { - // If we have the ID already, we don't need the GetGameList request. + // If we have the ID already, we don't need the GetGamelist request. requests.push(std::unique_ptr(new TheGamesDBJSONRequest(results, path))); } else { diff --git a/es-app/src/scrapers/GamesDBJSONScraper.h b/es-app/src/scrapers/GamesDBJSONScraper.h index 4b854c75d..26eac321b 100644 --- a/es-app/src/scrapers/GamesDBJSONScraper.h +++ b/es-app/src/scrapers/GamesDBJSONScraper.h @@ -30,7 +30,7 @@ void thegamesdb_generate_json_scraper_requests( class TheGamesDBJSONRequest : public ScraperHttpRequest { public: - // Constructor for a GetGameList request. + // Constructor for a GetGamelist request. TheGamesDBJSONRequest(std::queue>& requestsWrite, std::vector& resultsWrite, const std::string& url) diff --git a/es-app/src/scrapers/ScreenScraper.h b/es-app/src/scrapers/ScreenScraper.h index 7c2c9da2d..3056e6ba1 100644 --- a/es-app/src/scrapers/ScreenScraper.h +++ b/es-app/src/scrapers/ScreenScraper.h @@ -25,7 +25,7 @@ void screenscraper_generate_scraper_requests(const ScraperSearchParams& params, class ScreenScraperRequest : public ScraperHttpRequest { public: - // ctor for a GetGameList request. + // Constructor for a GetGamelist request. ScreenScraperRequest(std::queue>& requestsWrite, std::vector& resultsWrite, const std::string& url) @@ -34,7 +34,7 @@ public: { } - // ctor for a GetGame request. + // Constructor for a GetGame request. ScreenScraperRequest(std::vector& resultsWrite, const std::string& url) : ScraperHttpRequest(resultsWrite, url) , mRequestQueue(nullptr) diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 029a4360b..a71feec3e 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -283,7 +283,7 @@ bool SystemView::input(InputConfig* config, Input input) if (config->isMappedTo("a", input)) { stopScrolling(); - ViewController::getInstance()->goToGameList(getSelected()); + ViewController::getInstance()->goToGamelist(getSelected()); NavigationSounds::getInstance().playThemeNavigationSound(SELECTSOUND); return true; } diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 3fe60f91e..d6d04f0f8 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -28,10 +28,10 @@ #include "guis/GuiTextEditPopup.h" #include "views/SystemView.h" #include "views/UIModeController.h" -#include "views/gamelist/DetailedGameListView.h" -#include "views/gamelist/GridGameListView.h" -#include "views/gamelist/IGameListView.h" -#include "views/gamelist/VideoGameListView.h" +#include "views/gamelist/DetailedGamelistView.h" +#include "views/gamelist/GridGamelistView.h" +#include "views/gamelist/IGamelistView.h" +#include "views/gamelist/VideoGamelistView.h" #if defined(_MSC_VER) // MSVC compiler. const std::string ViewController::CONTROLLER_CHAR = Utils::String::wideStringToString(L"\uf11b"); @@ -249,7 +249,7 @@ void ViewController::goToStart(bool playTransition) for (auto it = SystemData::sSystemVector.cbegin(); // Line break. it != SystemData::sSystemVector.cend(); ++it) { if ((*it)->getName() == requestedSystem) { - goToGameList(*it); + goToGamelist(*it); if (!playTransition) cancelViewTransitions(); return; @@ -416,27 +416,27 @@ void ViewController::goToSystem(SystemData* system, bool animate) mSystemListView->goToSystem(system, animate); } -void ViewController::goToNextGameList() +void ViewController::goToNextGamelist() { assert(mState.viewing == GAME_LIST); SystemData* system = getState().getSystem(); assert(system); NavigationSounds::getInstance().playThemeNavigationSound(QUICKSYSSELECTSOUND); mNextSystem = true; - goToGameList(system->getNext()); + goToGamelist(system->getNext()); } -void ViewController::goToPrevGameList() +void ViewController::goToPrevGamelist() { assert(mState.viewing == GAME_LIST); SystemData* system = getState().getSystem(); assert(system); NavigationSounds::getInstance().playThemeNavigationSound(QUICKSYSSELECTSOUND); mNextSystem = false; - goToGameList(system->getPrev()); + goToGamelist(system->getPrev()); } -void ViewController::goToGameList(SystemData* system) +void ViewController::goToGamelist(SystemData* system) { bool wrapFirstToLast = false; bool wrapLastToFirst = false; @@ -462,7 +462,7 @@ void ViewController::goToGameList(SystemData* system) else if (!mPreviousView && mState.viewing == GAME_LIST) { // This is needed as otherwise the static image would not get rendered during the // first Slide transition when coming from the System view. - mSkipView = getGameListView(system); + mSkipView = getGamelistView(system); } if (mState.viewing != SYSTEM_SELECT) { @@ -516,7 +516,7 @@ void ViewController::goToGameList(SystemData* system) if (wrapFirstToLast) { glm::vec3 currentPosition{mCurrentView->getPosition()}; mWrapPreviousPositionX = currentPosition.x; - float offsetX{getGameListView(system)->getPosition().x}; + float offsetX{getGamelistView(system)->getPosition().x}; // This is needed to move the camera in the correct direction if there are only two systems. if (SystemData::sSystemVector.size() == 2 && mNextSystem) offsetX -= Renderer::getScreenWidth(); @@ -530,7 +530,7 @@ void ViewController::goToGameList(SystemData* system) else if (wrapLastToFirst) { glm::vec3 currentPosition{mCurrentView->getPosition()}; mWrapPreviousPositionX = currentPosition.x; - float offsetX{getGameListView(system)->getPosition().x}; + float offsetX{getGamelistView(system)->getPosition().x}; if (SystemData::sSystemVector.size() == 2 && !mNextSystem) offsetX += Renderer::getScreenWidth(); else @@ -541,7 +541,7 @@ void ViewController::goToGameList(SystemData* system) mWrappedViews = true; } - mCurrentView = getGameListView(system); + mCurrentView = getGamelistView(system); // Application startup animation, if starting in a gamelist rather than in the system view. if (mState.viewing == NOTHING) { @@ -561,8 +561,8 @@ void ViewController::goToGameList(SystemData* system) mState.viewing = GAME_LIST; mState.system = system; - auto it = mGameListViews.find(system); - if (it != mGameListViews.cend()) { + auto it = mGamelistViews.find(system); + if (it != mGamelistViews.cend()) { std::string viewStyle = it->second->getName(); if (viewStyle == "basic") mState.viewstyle = BASIC; @@ -664,11 +664,11 @@ void ViewController::playViewTransition(bool instant) } } -void ViewController::onFileChanged(FileData* file, bool reloadGameList) +void ViewController::onFileChanged(FileData* file, bool reloadGamelist) { - auto it = mGameListViews.find(file->getSystem()); - if (it != mGameListViews.cend()) - it->second->onFileChanged(file, reloadGameList); + auto it = mGamelistViews.find(file->getSystem()); + if (it != mGamelistViews.cend()) + it->second->onFileChanged(file, reloadGamelist); } void ViewController::launch(FileData* game) @@ -731,30 +731,30 @@ void ViewController::launch(FileData* game) }); } -void ViewController::removeGameListView(SystemData* system) +void ViewController::removeGamelistView(SystemData* system) { - auto exists = mGameListViews.find(system); - if (exists != mGameListViews.cend()) { + auto exists = mGamelistViews.find(system); + if (exists != mGamelistViews.cend()) { exists->second.reset(); - mGameListViews.erase(system); + mGamelistViews.erase(system); } } -std::shared_ptr ViewController::getGameListView(SystemData* system) +std::shared_ptr ViewController::getGamelistView(SystemData* system) { // If we have already created an entry for this system, then return that one. - auto exists = mGameListViews.find(system); - if (exists != mGameListViews.cend()) + auto exists = mGamelistViews.find(system); + if (exists != mGamelistViews.cend()) return exists->second; system->getIndex()->setKidModeFilters(); // If there's no entry, then create it and return it. - std::shared_ptr view; + std::shared_ptr view; bool themeHasVideoView = system->getTheme()->hasView("video"); // Decide which view style to use. - GameListViewStyle selectedViewStyle = AUTOMATIC; + GamelistViewStyle selectedViewStyle = AUTOMATIC; std::string viewPreference = Settings::getInstance()->getString("GamelistViewStyle"); if (viewPreference.compare("basic") == 0) @@ -783,28 +783,28 @@ std::shared_ptr ViewController::getGameListView(SystemData* syste // Create the view. switch (selectedViewStyle) { case VIDEO: { - view = std::shared_ptr( - new VideoGameListView(mWindow, system->getRootFolder())); + view = std::shared_ptr( + new VideoGamelistView(mWindow, system->getRootFolder())); mState.viewstyle = VIDEO; break; } case DETAILED: { - view = std::shared_ptr( - new DetailedGameListView(mWindow, system->getRootFolder())); + view = std::shared_ptr( + new DetailedGamelistView(mWindow, system->getRootFolder())); mState.viewstyle = DETAILED; break; } case GRID: { - view = std::shared_ptr( - new GridGameListView(mWindow, system->getRootFolder())); + view = std::shared_ptr( + new GridGamelistView(mWindow, system->getRootFolder())); mState.viewstyle = GRID; break; } case BASIC: { } default: { - view = std::shared_ptr( - new BasicGameListView(mWindow, system->getRootFolder())); + view = std::shared_ptr( + new BasicGamelistView(mWindow, system->getRootFolder())); mState.viewstyle = BASIC; break; } @@ -819,7 +819,7 @@ std::shared_ptr ViewController::getGameListView(SystemData* syste addChild(view.get()); - mGameListViews[system] = view; + mGamelistViews[system] = view; return view; } @@ -924,7 +924,7 @@ void ViewController::render(const glm::mat4& parentTrans) getSystemListView()->render(trans); // Draw the gamelists. - for (auto it = mGameListViews.cbegin(); it != mGameListViews.cend(); ++it) { + for (auto it = mGamelistViews.cbegin(); it != mGamelistViews.cend(); ++it) { // Same thing as for the system view, limit the rendering only to what needs to be drawn. if (it->second == mCurrentView || (it->second == mPreviousView && isCameraMoving())) { // Clipping. @@ -970,9 +970,9 @@ void ViewController::preload() (*it)->getIndex()->resetFilters(); if (Settings::getInstance()->getBool("PreloadGamelists")) - getGameListView(*it)->preloadGamelist(); + getGamelistView(*it)->preloadGamelist(); else - getGameListView(*it); + getGamelistView(*it); } // Load navigation sounds, either from the theme if it supports it, or otherwise from @@ -989,9 +989,9 @@ void ViewController::preload() NavigationSounds::getInstance().loadThemeNavigationSounds(nullptr); } -void ViewController::reloadGameListView(IGameListView* view, bool reloadTheme) +void ViewController::reloadGamelistView(IGamelistView* view, bool reloadTheme) { - for (auto it = mGameListViews.cbegin(); it != mGameListViews.cend(); ++it) { + for (auto it = mGamelistViews.cbegin(); it != mGamelistViews.cend(); ++it) { if (it->second.get() == view) { bool isCurrent = (mCurrentView == it->second); SystemData* system = it->first; @@ -1001,7 +1001,7 @@ void ViewController::reloadGameListView(IGameListView* view, bool reloadTheme) std::vector cursorHistoryTemp; it->second->copyCursorHistory(cursorHistoryTemp); - mGameListViews.erase(it); + mGamelistViews.erase(it); if (isCurrent) mCurrentView = nullptr; @@ -1009,7 +1009,7 @@ void ViewController::reloadGameListView(IGameListView* view, bool reloadTheme) if (reloadTheme) system->loadTheme(); system->getIndex()->setKidModeFilters(); - std::shared_ptr newView = getGameListView(system); + std::shared_ptr newView = getGamelistView(system); // To counter having come from a placeholder. if (!cursor->isPlaceHolder()) { @@ -1043,19 +1043,19 @@ void ViewController::reloadAll() cancelViewTransitions(); - // Clear all GameListViews. + // Clear all GamelistViews. std::map cursorMap; - for (auto it = mGameListViews.cbegin(); it != mGameListViews.cend(); ++it) + for (auto it = mGamelistViews.cbegin(); it != mGamelistViews.cend(); ++it) cursorMap[it->first] = it->second->getCursor(); - mGameListViews.clear(); + mGamelistViews.clear(); mCurrentView = nullptr; - // Load themes, create GameListViews and reset filters. + // Load themes, create GamelistViews and reset filters. for (auto it = cursorMap.cbegin(); it != cursorMap.cend(); ++it) { it->first->loadTheme(); it->first->getIndex()->resetFilters(); - getGameListView(it->first)->setCursor(it->second); + getGamelistView(it->first)->setCursor(it->second); } // Rebuild SystemListView. @@ -1064,7 +1064,7 @@ void ViewController::reloadAll() // Update mCurrentView since the pointers changed. if (mState.viewing == GAME_LIST) { - mCurrentView = getGameListView(mState.getSystem()); + mCurrentView = getGamelistView(mState.getSystem()); } else if (mState.viewing == SYSTEM_SELECT) { SystemData* system = mState.getSystem(); diff --git a/es-app/src/views/ViewController.h b/es-app/src/views/ViewController.h index 29419c849..cde4f4a96 100644 --- a/es-app/src/views/ViewController.h +++ b/es-app/src/views/ViewController.h @@ -20,7 +20,7 @@ #include -class IGameListView; +class IGamelistView; class SystemData; class SystemView; @@ -36,25 +36,25 @@ public: void noGamesDialog(); void invalidAlternativeEmulatorDialog(); - // Try to completely populate the GameListView map. + // Try to completely populate the GamelistView map. // Caches things so there's no pauses during transitions. void preload(); // If a basic view detected a metadata change, it can request to recreate // the current gamelist view (as it may change to be detailed). - void reloadGameListView(IGameListView* gamelist, bool reloadTheme = false); - void reloadGameListView(SystemData* system, bool reloadTheme = false) + void reloadGamelistView(IGamelistView* gamelist, bool reloadTheme = false); + void reloadGamelistView(SystemData* system, bool reloadTheme = false) { - reloadGameListView(getGameListView(system).get(), reloadTheme); + reloadGamelistView(getGamelistView(system).get(), reloadTheme); } // Reload everything with a theme. // Used when the "ThemeSet" setting changes. void reloadAll(); // Navigation. - void goToNextGameList(); - void goToPrevGameList(); - void goToGameList(SystemData* system); + void goToNextGamelist(); + void goToPrevGamelist(); + void goToGamelist(SystemData* system); void goToSystemView(SystemData* system, bool playTransition); void goToSystem(SystemData* system, bool animate); void goToStart(bool playTransition); @@ -65,7 +65,7 @@ public: void cancelViewTransitions(); void stopScrolling(); - void onFileChanged(FileData* file, bool reloadGameList); + void onFileChanged(FileData* file, bool reloadGamelist); void triggerGameLaunch(FileData* game) { mGameToLaunch = game; @@ -84,7 +84,7 @@ public: GAME_LIST }; - enum GameListViewStyle { + enum GamelistViewStyle { AUTOMATIC, // Replace with AllowShortEnumsOnASingleLine: false (clang-format >=11.0). BASIC, DETAILED, @@ -94,7 +94,7 @@ public: struct State { ViewMode viewing; - GameListViewStyle viewstyle; + GamelistViewStyle viewstyle; SystemData* getSystem() const { @@ -112,9 +112,9 @@ public: virtual std::vector getHelpPrompts() override; virtual HelpStyle getHelpStyle() override; - std::shared_ptr getGameListView(SystemData* system); + std::shared_ptr getGamelistView(SystemData* system); std::shared_ptr getSystemListView(); - void removeGameListView(SystemData* system); + void removeGamelistView(SystemData* system); // Font Awesome symbols. static const std::string CONTROLLER_CHAR; @@ -144,7 +144,7 @@ private: std::shared_ptr mCurrentView; std::shared_ptr mPreviousView; std::shared_ptr mSkipView; - std::map> mGameListViews; + std::map> mGamelistViews; std::shared_ptr mSystemListView; FileData* mGameToLaunch; diff --git a/es-app/src/views/gamelist/BasicGameListView.cpp b/es-app/src/views/gamelist/BasicGamelistView.cpp similarity index 92% rename from es-app/src/views/gamelist/BasicGameListView.cpp rename to es-app/src/views/gamelist/BasicGamelistView.cpp index 80dc2ce5f..ace7fb747 100644 --- a/es-app/src/views/gamelist/BasicGameListView.cpp +++ b/es-app/src/views/gamelist/BasicGamelistView.cpp @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// BasicGameListView.cpp +// BasicGamelistView.cpp // -// Interface that defines a GameListView of the type 'Basic'. +// Interface that defines a GamelistView of the type 'Basic'. // -#include "views/gamelist/BasicGameListView.h" +#include "views/gamelist/BasicGamelistView.h" #include "CollectionSystemsManager.h" #include "Settings.h" @@ -15,8 +15,8 @@ #include "views/UIModeController.h" #include "views/ViewController.h" -BasicGameListView::BasicGameListView(Window* window, FileData* root) - : ISimpleGameListView(window, root) +BasicGamelistView::BasicGamelistView(Window* window, FileData* root) + : ISimpleGamelistView(window, root) , mList(window) { mList.setSize(mSize.x, mSize.y * 0.8f); @@ -27,27 +27,27 @@ BasicGameListView::BasicGameListView(Window* window, FileData* root) populateList(root->getChildrenListToDisplay(), root); } -void BasicGameListView::onThemeChanged(const std::shared_ptr& theme) +void BasicGamelistView::onThemeChanged(const std::shared_ptr& theme) { - ISimpleGameListView::onThemeChanged(theme); + ISimpleGamelistView::onThemeChanged(theme); using namespace ThemeFlags; mList.applyTheme(theme, getName(), "gamelist", ALL); sortChildren(); } -void BasicGameListView::onFileChanged(FileData* file, bool reloadGameList) +void BasicGamelistView::onFileChanged(FileData* file, bool reloadGamelist) { - if (reloadGameList) { + if (reloadGamelist) { // Might switch to a detailed view. - ViewController::getInstance()->reloadGameListView(this); + ViewController::getInstance()->reloadGamelistView(this); return; } - ISimpleGameListView::onFileChanged(file, reloadGameList); + ISimpleGamelistView::onFileChanged(file, reloadGamelist); } -void BasicGameListView::populateList(const std::vector& files, FileData* firstEntry) +void BasicGamelistView::populateList(const std::vector& files, FileData* firstEntry) { mFirstGameEntry = nullptr; bool favoriteStar = true; @@ -119,7 +119,7 @@ void BasicGameListView::populateList(const std::vector& files, FileDa generateFirstLetterIndex(files); } -void BasicGameListView::setCursor(FileData* cursor) +void BasicGamelistView::setCursor(FileData* cursor) { if (!mList.setCursor(cursor) && (!cursor->isPlaceHolder())) { populateList(cursor->getParent()->getChildrenListToDisplay(), cursor->getParent()); @@ -146,7 +146,7 @@ void BasicGameListView::setCursor(FileData* cursor) } } -void BasicGameListView::addPlaceholder(FileData* firstEntry) +void BasicGamelistView::addPlaceholder(FileData* firstEntry) { // Empty list, add a placeholder. FileData* placeholder; @@ -159,13 +159,13 @@ void BasicGameListView::addPlaceholder(FileData* firstEntry) mList.add(placeholder->getName(), placeholder, (placeholder->getType() == PLACEHOLDER)); } -void BasicGameListView::launch(FileData* game) +void BasicGamelistView::launch(FileData* game) { // This triggers ViewController to launch the game. ViewController::getInstance()->triggerGameLaunch(game); } -void BasicGameListView::remove(FileData* game, bool deleteFile) +void BasicGamelistView::remove(FileData* game, bool deleteFile) { // Delete the game file on the filesystem. if (deleteFile) @@ -204,7 +204,7 @@ void BasicGameListView::remove(FileData* game, bool deleteFile) } } -void BasicGameListView::removeMedia(FileData* game) +void BasicGamelistView::removeMedia(FileData* game) { std::string systemMediaDir = FileData::getMediaDirectory() + game->getSystem()->getName(); std::string mediaType; @@ -308,7 +308,7 @@ void BasicGameListView::removeMedia(FileData* game) } } -std::vector BasicGameListView::getHelpPrompts() +std::vector BasicGamelistView::getHelpPrompts() { std::vector prompts; diff --git a/es-app/src/views/gamelist/BasicGameListView.h b/es-app/src/views/gamelist/BasicGamelistView.h similarity index 87% rename from es-app/src/views/gamelist/BasicGameListView.h rename to es-app/src/views/gamelist/BasicGamelistView.h index c204433bc..3d0b650bf 100644 --- a/es-app/src/views/gamelist/BasicGameListView.h +++ b/es-app/src/views/gamelist/BasicGamelistView.h @@ -1,24 +1,24 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// BasicGameListView.h +// BasicGamelistView.h // -// Interface that defines a GameListView of the type 'basic'. +// Interface that defines a GamelistView of the type 'basic'. // #ifndef ES_APP_VIEWS_GAME_LIST_BASIC_GAME_LIST_VIEW_H #define ES_APP_VIEWS_GAME_LIST_BASIC_GAME_LIST_VIEW_H #include "components/TextListComponent.h" -#include "views/gamelist/ISimpleGameListView.h" +#include "views/gamelist/ISimpleGamelistView.h" -class BasicGameListView : public ISimpleGameListView +class BasicGamelistView : public ISimpleGamelistView { public: - BasicGameListView(Window* window, FileData* root); + BasicGamelistView(Window* window, FileData* root); // Called when a FileData* is added, has its metadata changed, or is removed. - virtual void onFileChanged(FileData* file, bool reloadGameList) override; + virtual void onFileChanged(FileData* file, bool reloadGamelist) override; virtual void onThemeChanged(const std::shared_ptr& theme) override; virtual void setCursor(FileData* cursor) override; diff --git a/es-app/src/views/gamelist/DetailedGameListView.cpp b/es-app/src/views/gamelist/DetailedGamelistView.cpp similarity index 96% rename from es-app/src/views/gamelist/DetailedGameListView.cpp rename to es-app/src/views/gamelist/DetailedGamelistView.cpp index da959d860..3503fd619 100644 --- a/es-app/src/views/gamelist/DetailedGameListView.cpp +++ b/es-app/src/views/gamelist/DetailedGamelistView.cpp @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// DetailedGameListView.cpp +// DetailedGamelistView.cpp // -// Interface that defines a GameListView of the type 'detailed'. +// Interface that defines a GamelistView of the type 'detailed'. // -#include "views/gamelist/DetailedGameListView.h" +#include "views/gamelist/DetailedGamelistView.h" #include "CollectionSystemsManager.h" #include "SystemData.h" @@ -16,8 +16,8 @@ #define FADE_IN_START_OPACITY 0.5f #define FADE_IN_TIME 650 -DetailedGameListView::DetailedGameListView(Window* window, FileData* root) - : BasicGameListView(window, root) +DetailedGamelistView::DetailedGamelistView(Window* window, FileData* root) + : BasicGamelistView(window, root) , mThumbnail(window) , mMarquee(window) , mImage(window) @@ -137,9 +137,9 @@ DetailedGameListView::DetailedGameListView(Window* window, FileData* root) initMDValues(); } -void DetailedGameListView::onThemeChanged(const std::shared_ptr& theme) +void DetailedGamelistView::onThemeChanged(const std::shared_ptr& theme) { - BasicGameListView::onThemeChanged(theme); + BasicGamelistView::onThemeChanged(theme); using namespace ThemeFlags; mThumbnail.applyTheme(theme, getName(), "md_thumbnail", @@ -188,7 +188,7 @@ void DetailedGameListView::onThemeChanged(const std::shared_ptr& them sortChildren(); } -void DetailedGameListView::initMDLabels() +void DetailedGamelistView::initMDLabels() { std::vector components = getMDLabels(); @@ -218,7 +218,7 @@ void DetailedGameListView::initMDLabels() } } -void DetailedGameListView::initMDValues() +void DetailedGamelistView::initMDValues() { std::vector labels = getMDLabels(); std::vector values = getMDValues(); @@ -253,7 +253,7 @@ void DetailedGameListView::initMDValues() mDescContainer.setSize(mDescContainer.getSize().x, mSize.y - mDescContainer.getPosition().y); } -void DetailedGameListView::updateInfoPanel() +void DetailedGamelistView::updateInfoPanel() { FileData* file = (mList.size() == 0 || mList.isScrolling()) ? nullptr : mList.getSelected(); @@ -474,12 +474,12 @@ void DetailedGameListView::updateInfoPanel() } } -void DetailedGameListView::launch(FileData* game) +void DetailedGamelistView::launch(FileData* game) { ViewController::getInstance()->triggerGameLaunch(game); } -std::vector DetailedGameListView::getMDLabels() +std::vector DetailedGamelistView::getMDLabels() { std::vector ret; ret.push_back(&mLblRating); @@ -493,7 +493,7 @@ std::vector DetailedGameListView::getMDLabels() return ret; } -std::vector DetailedGameListView::getMDValues() +std::vector DetailedGamelistView::getMDValues() { std::vector ret; ret.push_back(&mRating); @@ -507,16 +507,16 @@ std::vector DetailedGameListView::getMDValues() return ret; } -void DetailedGameListView::update(int deltaTime) +void DetailedGamelistView::update(int deltaTime) { - BasicGameListView::update(deltaTime); + BasicGamelistView::update(deltaTime); mImage.update(deltaTime); if (ViewController::getInstance()->getGameLaunchTriggered() && mImage.isAnimationPlaying(0)) mImage.finishAnimation(0); } -void DetailedGameListView::onShow() +void DetailedGamelistView::onShow() { // Reset any Lottie animations. for (auto extra : mThemeExtras) diff --git a/es-app/src/views/gamelist/DetailedGameListView.h b/es-app/src/views/gamelist/DetailedGamelistView.h similarity index 87% rename from es-app/src/views/gamelist/DetailedGameListView.h rename to es-app/src/views/gamelist/DetailedGamelistView.h index 08302d5a7..19df05c44 100644 --- a/es-app/src/views/gamelist/DetailedGameListView.h +++ b/es-app/src/views/gamelist/DetailedGamelistView.h @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// DetailedGameListView.h +// DetailedGamelistView.h // -// Interface that defines a GameListView of the type 'detailed'. +// Interface that defines a GamelistView of the type 'detailed'. // #ifndef ES_APP_VIEWS_GAME_LIST_DETAILED_GAME_LIST_VIEW_H @@ -13,12 +13,12 @@ #include "components/DateTimeComponent.h" #include "components/RatingComponent.h" #include "components/ScrollableContainer.h" -#include "views/gamelist/BasicGameListView.h" +#include "views/gamelist/BasicGamelistView.h" -class DetailedGameListView : public BasicGameListView +class DetailedGamelistView : public BasicGamelistView { public: - DetailedGameListView(Window* window, FileData* root); + DetailedGamelistView(Window* window, FileData* root); virtual void onShow() override; virtual void onThemeChanged(const std::shared_ptr& theme) override; diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGamelistView.cpp similarity index 94% rename from es-app/src/views/gamelist/GridGameListView.cpp rename to es-app/src/views/gamelist/GridGamelistView.cpp index 840942c4d..f45f11ea1 100644 --- a/es-app/src/views/gamelist/GridGameListView.cpp +++ b/es-app/src/views/gamelist/GridGamelistView.cpp @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// GridGameListView.cpp +// GridGamelistView.cpp // -// Interface that defines a GameListView of the type 'grid'. +// Interface that defines a GamelistView of the type 'grid'. // -#include "views/gamelist/GridGameListView.h" +#include "views/gamelist/GridGamelistView.h" #include "CollectionSystemsManager.h" #include "Settings.h" @@ -19,8 +19,8 @@ #define FADE_IN_START_OPACITY 0.5f #define FADE_IN_TIME 650 -GridGameListView::GridGameListView(Window* window, FileData* root) - : ISimpleGameListView(window, root) +GridGamelistView::GridGamelistView(Window* window, FileData* root) + : ISimpleGamelistView(window, root) , mGrid(window) , mMarquee(window) , mImage(window) @@ -126,18 +126,18 @@ GridGameListView::GridGameListView(Window* window, FileData* root) updateInfoPanel(); } -void GridGameListView::onFileChanged(FileData* file, bool reloadGameList) +void GridGamelistView::onFileChanged(FileData* file, bool reloadGamelist) { - if (reloadGameList) { + if (reloadGamelist) { // Might switch to a detailed view. - ViewController::getInstance()->reloadGameListView(this); + ViewController::getInstance()->reloadGamelistView(this); return; } - ISimpleGameListView::onFileChanged(file, reloadGameList); + ISimpleGamelistView::onFileChanged(file, reloadGamelist); } -void GridGameListView::setCursor(FileData* cursor) +void GridGamelistView::setCursor(FileData* cursor) { if (!mGrid.setCursor(cursor) && (!cursor->isPlaceHolder())) { populateList(cursor->getParent()->getChildrenListToDisplay(), cursor->getParent()); @@ -163,7 +163,7 @@ void GridGameListView::setCursor(FileData* cursor) } } -bool GridGameListView::input(InputConfig* config, Input input) +bool GridGamelistView::input(InputConfig* config, Input input) { if (input.value == 0 && (config->isMappedLike("left", input) || config->isMappedLike("right", input) || @@ -183,10 +183,10 @@ bool GridGameListView::input(InputConfig* config, Input input) if (config->isMappedLike("left", input) || config->isMappedLike("right", input)) return GuiComponent::input(config, input); - return ISimpleGameListView::input(config, input); + return ISimpleGamelistView::input(config, input); } -const std::string GridGameListView::getImagePath(FileData* file) +const std::string GridGamelistView::getImagePath(FileData* file) { ImageSource src = mGrid.getImageSource(); @@ -210,7 +210,7 @@ const std::string GridGameListView::getImagePath(FileData* file) return file->getThumbnailPath(); } -void GridGameListView::populateList(const std::vector& files, FileData* firstEntry) +void GridGamelistView::populateList(const std::vector& files, FileData* firstEntry) { firstGameEntry = nullptr; @@ -231,9 +231,9 @@ void GridGameListView::populateList(const std::vector& files, FileDat generateFirstLetterIndex(files); } -void GridGameListView::onThemeChanged(const std::shared_ptr& theme) +void GridGamelistView::onThemeChanged(const std::shared_ptr& theme) { - ISimpleGameListView::onThemeChanged(theme); + ISimpleGamelistView::onThemeChanged(theme); using namespace ThemeFlags; mGrid.applyTheme(theme, getName(), "gamegrid", ALL); @@ -286,7 +286,7 @@ void GridGameListView::onThemeChanged(const std::shared_ptr& theme) sortChildren(); } -void GridGameListView::onShow() +void GridGamelistView::onShow() { // Reset any Lottie animations. for (auto extra : mThemeExtras) @@ -296,7 +296,7 @@ void GridGameListView::onShow() updateInfoPanel(); } -void GridGameListView::initMDLabels() +void GridGamelistView::initMDLabels() { std::vector components = getMDLabels(); @@ -326,7 +326,7 @@ void GridGameListView::initMDLabels() } } -void GridGameListView::initMDValues() +void GridGamelistView::initMDValues() { std::vector labels = getMDLabels(); std::vector values = getMDValues(); @@ -360,7 +360,7 @@ void GridGameListView::initMDValues() mDescContainer.setSize(mDescContainer.getSize().x, mSize.y - mDescContainer.getPosition().y); } -void GridGameListView::updateInfoPanel() +void GridGamelistView::updateInfoPanel() { FileData* file = (mGrid.size() == 0 || mGrid.isScrolling()) ? nullptr : mGrid.getSelected(); bool hideMetaDataFields = false; @@ -507,7 +507,7 @@ void GridGameListView::updateInfoPanel() } } -void GridGameListView::addPlaceholder(FileData* firstEntry) +void GridGamelistView::addPlaceholder(FileData* firstEntry) { // Empty list, add a placeholder. FileData* placeholder; @@ -520,13 +520,13 @@ void GridGameListView::addPlaceholder(FileData* firstEntry) mGrid.add(placeholder->getName(), "", placeholder); } -void GridGameListView::launch(FileData* game) +void GridGamelistView::launch(FileData* game) { // This triggers ViewController to launch the game. ViewController::getInstance()->triggerGameLaunch(game); } -void GridGameListView::remove(FileData* game, bool deleteFile) +void GridGamelistView::remove(FileData* game, bool deleteFile) { // Delete the game file on the filesystem. if (deleteFile) @@ -560,7 +560,7 @@ void GridGameListView::remove(FileData* game, bool deleteFile) onFileChanged(parent, false); } -void GridGameListView::removeMedia(FileData* game) +void GridGamelistView::removeMedia(FileData* game) { std::string systemMediaDir = FileData::getMediaDirectory() + game->getSystem()->getName(); std::string mediaType; @@ -661,7 +661,7 @@ void GridGameListView::removeMedia(FileData* game) } } -std::vector GridGameListView::getMDLabels() +std::vector GridGamelistView::getMDLabels() { std::vector ret; ret.push_back(&mLblRating); @@ -675,7 +675,7 @@ std::vector GridGameListView::getMDLabels() return ret; } -std::vector GridGameListView::getMDValues() +std::vector GridGamelistView::getMDValues() { std::vector ret; ret.push_back(&mRating); @@ -689,7 +689,7 @@ std::vector GridGameListView::getMDValues() return ret; } -std::vector GridGameListView::getHelpPrompts() +std::vector GridGamelistView::getHelpPrompts() { std::vector prompts; @@ -736,8 +736,8 @@ std::vector GridGameListView::getHelpPrompts() return prompts; } -void GridGameListView::update(int deltaTime) +void GridGamelistView::update(int deltaTime) { // Update. - ISimpleGameListView::update(deltaTime); + ISimpleGamelistView::update(deltaTime); } diff --git a/es-app/src/views/gamelist/GridGameListView.h b/es-app/src/views/gamelist/GridGamelistView.h similarity index 91% rename from es-app/src/views/gamelist/GridGameListView.h rename to es-app/src/views/gamelist/GridGamelistView.h index f84d52cf7..5bdc02be6 100644 --- a/es-app/src/views/gamelist/GridGameListView.h +++ b/es-app/src/views/gamelist/GridGamelistView.h @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// GridGameListView.h +// GridGamelistView.h // -// Interface that defines a GameListView of the type 'grid'. +// Interface that defines a GamelistView of the type 'grid'. // #ifndef ES_APP_VIEWS_GAME_LIST_GRID_GAME_LIST_VIEW_H @@ -15,16 +15,16 @@ #include "components/RatingComponent.h" #include "components/ScrollableContainer.h" #include "components/VideoComponent.h" -#include "views/gamelist/ISimpleGameListView.h" +#include "views/gamelist/ISimpleGamelistView.h" -class GridGameListView : public ISimpleGameListView +class GridGamelistView : public ISimpleGamelistView { public: - GridGameListView(Window* window, FileData* root); - virtual ~GridGameListView() {} + GridGamelistView(Window* window, FileData* root); + virtual ~GridGamelistView() {} // Called when a FileData* is added, has its metadata changed, or is removed. - virtual void onFileChanged(FileData* file, bool reloadGameList) override; + virtual void onFileChanged(FileData* file, bool reloadGamelist) override; virtual void onShow() override; virtual void onThemeChanged(const std::shared_ptr& theme) override; diff --git a/es-app/src/views/gamelist/IGameListView.cpp b/es-app/src/views/gamelist/IGamelistView.cpp similarity index 76% rename from es-app/src/views/gamelist/IGameListView.cpp rename to es-app/src/views/gamelist/IGamelistView.cpp index dcd86aaab..a63489989 100644 --- a/es-app/src/views/gamelist/IGameListView.cpp +++ b/es-app/src/views/gamelist/IGamelistView.cpp @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// IGameListView.cpp +// IGamelistView.cpp // -// Interface that defines the minimum for a GameListView. +// Interface that defines the minimum for a GamelistView. // -#include "views/gamelist/IGameListView.h" +#include "views/gamelist/IGamelistView.h" #include "Sound.h" #include "Window.h" @@ -14,7 +14,7 @@ #include "views/UIModeController.h" #include "views/ViewController.h" -IGameListView::IGameListView(Window* window, FileData* root) +IGamelistView::IGamelistView(Window* window, FileData* root) : GuiComponent(window) , mRoot(root) { @@ -22,13 +22,13 @@ IGameListView::IGameListView(Window* window, FileData* root) static_cast(Renderer::getScreenHeight())); } -void IGameListView::setTheme(const std::shared_ptr& theme) +void IGamelistView::setTheme(const std::shared_ptr& theme) { mTheme = theme; onThemeChanged(theme); } -bool IGameListView::input(InputConfig* config, Input input) +bool IGamelistView::input(InputConfig* config, Input input) { // Select button opens GuiGamelistOptions. if (!UIModeController::getInstance()->isUIModeKid() && // Line break. @@ -44,22 +44,22 @@ bool IGameListView::input(InputConfig* config, Input input) config->getDeviceId() == DEVICE_KEYBOARD && (SDL_GetModState() & (KMOD_LCTRL | KMOD_RCTRL)) && input.id == SDLK_r && input.value != 0) { - LOG(LogDebug) << "IGameListView::input(): Reloading view"; - ViewController::getInstance()->reloadGameListView(this, true); + LOG(LogDebug) << "IGamelistView::input(): Reloading view"; + ViewController::getInstance()->reloadGamelistView(this, true); return true; } return GuiComponent::input(config, input); } -HelpStyle IGameListView::getHelpStyle() +HelpStyle IGamelistView::getHelpStyle() { HelpStyle style; style.applyTheme(mTheme, getName()); return style; } -void IGameListView::render(const glm::mat4& parentTrans) +void IGamelistView::render(const glm::mat4& parentTrans) { glm::mat4 trans{parentTrans * getTransform()}; diff --git a/es-app/src/views/gamelist/IGameListView.h b/es-app/src/views/gamelist/IGamelistView.h similarity index 84% rename from es-app/src/views/gamelist/IGameListView.h rename to es-app/src/views/gamelist/IGamelistView.h index 9c31185d9..ed96373c8 100644 --- a/es-app/src/views/gamelist/IGameListView.h +++ b/es-app/src/views/gamelist/IGamelistView.h @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// IGameListView.h +// IGamelistView.h // -// Interface that defines the minimum for a GameListView. +// Interface that defines the minimum for a GamelistView. // #ifndef ES_APP_VIEWS_GAME_LIST_IGAME_LIST_VIEW_H @@ -16,15 +16,15 @@ class ThemeData; class Window; -// This is an interface that defines the minimum for a GameListView. -class IGameListView : public GuiComponent +// This is an interface that defines the minimum for a GamelistView. +class IGamelistView : public GuiComponent { public: - IGameListView(Window* window, FileData* root); - virtual ~IGameListView() {} + IGamelistView(Window* window, FileData* root); + virtual ~IGamelistView() {} // Called when a FileData* is added, has its metadata changed, or is removed. - virtual void onFileChanged(FileData* file, bool reloadGameList) = 0; + virtual void onFileChanged(FileData* file, bool reloadGamelist) = 0; // Called whenever the theme changes. virtual void onThemeChanged(const std::shared_ptr& theme) = 0; diff --git a/es-app/src/views/gamelist/ISimpleGameListView.cpp b/es-app/src/views/gamelist/ISimpleGamelistView.cpp similarity index 95% rename from es-app/src/views/gamelist/ISimpleGameListView.cpp rename to es-app/src/views/gamelist/ISimpleGamelistView.cpp index 66ddb9bc6..404d92621 100644 --- a/es-app/src/views/gamelist/ISimpleGameListView.cpp +++ b/es-app/src/views/gamelist/ISimpleGamelistView.cpp @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// ISimpleGameListView.cpp +// ISimpleGamelistView.cpp // // Interface that defines a simple gamelist view. // -#include "views/gamelist/ISimpleGameListView.h" +#include "views/gamelist/ISimpleGamelistView.h" #include "CollectionSystemsManager.h" #include "FileFilterIndex.h" @@ -20,8 +20,8 @@ #include "Log.h" -ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root) - : IGameListView(window, root) +ISimpleGamelistView::ISimpleGamelistView(Window* window, FileData* root) + : IGamelistView(window, root) , mHeaderText(window) , mHeaderImage(window) , mBackground(window) @@ -45,7 +45,7 @@ ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root) addChild(&mBackground); } -ISimpleGameListView::~ISimpleGameListView() +ISimpleGamelistView::~ISimpleGamelistView() { // Remove theme extras. for (auto extra : mThemeExtras) { @@ -55,7 +55,7 @@ ISimpleGameListView::~ISimpleGameListView() mThemeExtras.clear(); } -void ISimpleGameListView::onThemeChanged(const std::shared_ptr& theme) +void ISimpleGamelistView::onThemeChanged(const std::shared_ptr& theme) { using namespace ThemeFlags; mBackground.applyTheme(theme, getName(), "background", ALL); @@ -84,7 +84,7 @@ void ISimpleGameListView::onThemeChanged(const std::shared_ptr& theme } } -void ISimpleGameListView::onFileChanged(FileData* file, bool reloadGameList) +void ISimpleGamelistView::onFileChanged(FileData* file, bool reloadGamelist) { // We could be tricky here to be efficient; // but this shouldn't happen very often so we'll just always repopulate. @@ -99,7 +99,7 @@ void ISimpleGameListView::onFileChanged(FileData* file, bool reloadGameList) } } -bool ISimpleGameListView::input(InputConfig* config, Input input) +bool ISimpleGamelistView::input(InputConfig* config, Input input) { if (input.value != 0) { if (config->isMappedTo("a", input)) { @@ -209,7 +209,7 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) onPauseVideo(); onFocusLost(); stopListScrolling(); - ViewController::getInstance()->goToNextGameList(); + ViewController::getInstance()->goToNextGamelist(); return true; } } @@ -219,7 +219,7 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) onPauseVideo(); onFocusLost(); stopListScrolling(); - ViewController::getInstance()->goToPrevGameList(); + ViewController::getInstance()->goToPrevGamelist(); return true; } } @@ -428,9 +428,9 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) // sorted yet. if (removedLastFavorite) { ViewController::getInstance() - ->getGameListView(entryToUpdate->getSystem()) + ->getGamelistView(entryToUpdate->getSystem()) ->setCursor(ViewController::getInstance() - ->getGameListView(entryToUpdate->getSystem()) + ->getGamelistView(entryToUpdate->getSystem()) ->getFirstEntry()); } return true; @@ -445,15 +445,15 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) // As the toggling of the game destroyed this object, we need to get the view // from ViewController instead of using the reference that existed before the // destruction. Otherwise we get random crashes. - IGameListView* view = - ViewController::getInstance()->getGameListView(system).get(); + IGamelistView* view = + ViewController::getInstance()->getGamelistView(system).get(); // Jump to the first entry in the gamelist if the last favorite was unmarked. if (foldersOnTop && removedLastFavorite && !entryToUpdate->getSystem()->isCustomCollection()) { ViewController::getInstance() - ->getGameListView(entryToUpdate->getSystem()) + ->getGamelistView(entryToUpdate->getSystem()) ->setCursor(ViewController::getInstance() - ->getGameListView(entryToUpdate->getSystem()) + ->getGamelistView(entryToUpdate->getSystem()) ->getFirstGameEntry()); } else if (removedLastFavorite && @@ -469,8 +469,8 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) if (isEditing) { for (auto it = SystemData::sSystemVector.begin(); it != SystemData::sSystemVector.end(); ++it) { - ViewController::getInstance()->getGameListView((*it))->onFileChanged( - ViewController::getInstance()->getGameListView((*it))->getCursor(), + ViewController::getInstance()->getGamelistView((*it))->onFileChanged( + ViewController::getInstance()->getGamelistView((*it))->getCursor(), false); } } @@ -483,10 +483,10 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) } } - return IGameListView::input(config, input); + return IGamelistView::input(config, input); } -void ISimpleGameListView::generateGamelistInfo(FileData* cursor, FileData* firstEntry) +void ISimpleGamelistView::generateGamelistInfo(FileData* cursor, FileData* firstEntry) { // Generate data needed for the gamelistInfo field, which is displayed from the // gamelist interfaces (Detailed/Video/Grid). @@ -525,7 +525,7 @@ void ISimpleGameListView::generateGamelistInfo(FileData* cursor, FileData* first mIsFolder = true; } -void ISimpleGameListView::generateFirstLetterIndex(const std::vector& files) +void ISimpleGamelistView::generateFirstLetterIndex(const std::vector& files) { std::string firstChar; diff --git a/es-app/src/views/gamelist/ISimpleGameListView.h b/es-app/src/views/gamelist/ISimpleGamelistView.h similarity index 89% rename from es-app/src/views/gamelist/ISimpleGameListView.h rename to es-app/src/views/gamelist/ISimpleGamelistView.h index cecb95fc9..20cda2818 100644 --- a/es-app/src/views/gamelist/ISimpleGameListView.h +++ b/es-app/src/views/gamelist/ISimpleGamelistView.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// ISimpleGameListView.h +// ISimpleGamelistView.h // // Interface that defines a simple gamelist view. // @@ -11,18 +11,18 @@ #include "components/ImageComponent.h" #include "components/TextComponent.h" -#include "views/gamelist/IGameListView.h" +#include "views/gamelist/IGamelistView.h" #include -class ISimpleGameListView : public IGameListView +class ISimpleGamelistView : public IGamelistView { public: - ISimpleGameListView(Window* window, FileData* root); - virtual ~ISimpleGameListView(); + ISimpleGamelistView(Window* window, FileData* root); + virtual ~ISimpleGamelistView(); // Called when a FileData* is added, has its metadata changed, or is removed. - virtual void onFileChanged(FileData* file, bool reloadGameList) override; + virtual void onFileChanged(FileData* file, bool reloadGamelist) override; // Called whenever the theme changes. virtual void onThemeChanged(const std::shared_ptr& theme) override; diff --git a/es-app/src/views/gamelist/VideoGameListView.cpp b/es-app/src/views/gamelist/VideoGamelistView.cpp similarity index 96% rename from es-app/src/views/gamelist/VideoGameListView.cpp rename to es-app/src/views/gamelist/VideoGamelistView.cpp index 0b964e563..f6c76bc5b 100644 --- a/es-app/src/views/gamelist/VideoGameListView.cpp +++ b/es-app/src/views/gamelist/VideoGamelistView.cpp @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// VideoGameListView.cpp +// VideoGamelistView.cpp // -// Interface that defines a GameListView of the type 'video'. +// Interface that defines a GamelistView of the type 'video'. // -#include "views/gamelist/VideoGameListView.h" +#include "views/gamelist/VideoGamelistView.h" #include "CollectionSystemsManager.h" #include "SystemData.h" @@ -18,8 +18,8 @@ #define FADE_IN_START_OPACITY 0.5f #define FADE_IN_TIME 650 -VideoGameListView::VideoGameListView(Window* window, FileData* root) - : BasicGameListView(window, root) +VideoGamelistView::VideoGamelistView(Window* window, FileData* root) + : BasicGamelistView(window, root) , mThumbnail(window) , mMarquee(window) , mImage(window) @@ -142,11 +142,11 @@ VideoGameListView::VideoGameListView(Window* window, FileData* root) initMDValues(); } -VideoGameListView::~VideoGameListView() { delete mVideo; } +VideoGamelistView::~VideoGamelistView() { delete mVideo; } -void VideoGameListView::onThemeChanged(const std::shared_ptr& theme) +void VideoGamelistView::onThemeChanged(const std::shared_ptr& theme) { - BasicGameListView::onThemeChanged(theme); + BasicGamelistView::onThemeChanged(theme); using namespace ThemeFlags; mThumbnail.applyTheme(theme, getName(), "md_thumbnail", @@ -198,7 +198,7 @@ void VideoGameListView::onThemeChanged(const std::shared_ptr& theme) sortChildren(); } -void VideoGameListView::initMDLabels() +void VideoGamelistView::initMDLabels() { std::vector components = getMDLabels(); @@ -228,7 +228,7 @@ void VideoGameListView::initMDLabels() } } -void VideoGameListView::initMDValues() +void VideoGamelistView::initMDValues() { std::vector labels = getMDLabels(); std::vector values = getMDValues(); @@ -263,7 +263,7 @@ void VideoGameListView::initMDValues() mDescContainer.setSize(mDescContainer.getSize().x, mSize.y - mDescContainer.getPosition().y); } -void VideoGameListView::updateInfoPanel() +void VideoGamelistView::updateInfoPanel() { FileData* file = (mList.size() == 0 || mList.isScrolling()) ? nullptr : mList.getSelected(); @@ -502,12 +502,12 @@ void VideoGameListView::updateInfoPanel() } } -void VideoGameListView::launch(FileData* game) +void VideoGamelistView::launch(FileData* game) { ViewController::getInstance()->triggerGameLaunch(game); } -std::vector VideoGameListView::getMDLabels() +std::vector VideoGamelistView::getMDLabels() { std::vector ret; ret.push_back(&mLblRating); @@ -521,7 +521,7 @@ std::vector VideoGameListView::getMDLabels() return ret; } -std::vector VideoGameListView::getMDValues() +std::vector VideoGamelistView::getMDValues() { std::vector ret; ret.push_back(&mRating); @@ -535,21 +535,21 @@ std::vector VideoGameListView::getMDValues() return ret; } -void VideoGameListView::update(int deltaTime) +void VideoGamelistView::update(int deltaTime) { if (!mVideoPlaying) mVideo->onHide(); else if (mVideoPlaying && !mVideo->isVideoPaused() && !mWindow->isScreensaverActive()) mVideo->onShow(); - BasicGameListView::update(deltaTime); + BasicGamelistView::update(deltaTime); mVideo->update(deltaTime); if (ViewController::getInstance()->getGameLaunchTriggered() && mVideo->isAnimationPlaying(0)) mVideo->finishAnimation(0); } -void VideoGameListView::onShow() +void VideoGamelistView::onShow() { // Reset any Lottie animations. for (auto extra : mThemeExtras) diff --git a/es-app/src/views/gamelist/VideoGameListView.h b/es-app/src/views/gamelist/VideoGamelistView.h similarity index 87% rename from es-app/src/views/gamelist/VideoGameListView.h rename to es-app/src/views/gamelist/VideoGamelistView.h index e0d6775de..f283b8671 100644 --- a/es-app/src/views/gamelist/VideoGameListView.h +++ b/es-app/src/views/gamelist/VideoGamelistView.h @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// VideoGameListView.h +// VideoGamelistView.h // -// Interface that defines a GameListView of the type 'video'. +// Interface that defines a GamelistView of the type 'video'. // #ifndef ES_APP_VIEWS_GAME_LIST_VIDEO_GAME_LIST_VIEW_H @@ -13,15 +13,15 @@ #include "components/DateTimeComponent.h" #include "components/RatingComponent.h" #include "components/ScrollableContainer.h" -#include "views/gamelist/BasicGameListView.h" +#include "views/gamelist/BasicGamelistView.h" class VideoComponent; -class VideoGameListView : public BasicGameListView +class VideoGamelistView : public BasicGamelistView { public: - VideoGameListView(Window* window, FileData* root); - virtual ~VideoGameListView(); + VideoGamelistView(Window* window, FileData* root); + virtual ~VideoGamelistView(); virtual void onShow() override; virtual void onThemeChanged(const std::shared_ptr& theme) override; diff --git a/es-core/src/components/GridTileComponent.cpp b/es-core/src/components/GridTileComponent.cpp index 99cb9794d..615dfd7b7 100644 --- a/es-core/src/components/GridTileComponent.cpp +++ b/es-core/src/components/GridTileComponent.cpp @@ -3,7 +3,7 @@ // EmulationStation Desktop Edition // GridTileComponent.cpp // -// X*Y tile grid, used indirectly by GridGameListView via ImageGridComponent. +// X*Y tile grid, used indirectly by GridGamelistView via ImageGridComponent. // #include "GridTileComponent.h" diff --git a/es-core/src/components/GridTileComponent.h b/es-core/src/components/GridTileComponent.h index edc583aaf..27f900fb6 100644 --- a/es-core/src/components/GridTileComponent.h +++ b/es-core/src/components/GridTileComponent.h @@ -3,7 +3,7 @@ // EmulationStation Desktop Edition // GridTileComponent.h // -// X*Y tile grid, used indirectly by GridGameListView via ImageGridComponent. +// X*Y tile grid, used indirectly by GridGamelistView via ImageGridComponent. // #ifndef ES_CORE_COMPONENTS_GRID_TILE_COMPONENT_H diff --git a/es-core/src/components/ImageGridComponent.h b/es-core/src/components/ImageGridComponent.h index 40da603d1..46e21da23 100644 --- a/es-core/src/components/ImageGridComponent.h +++ b/es-core/src/components/ImageGridComponent.h @@ -3,7 +3,7 @@ // EmulationStation Desktop Edition // ImageGridComponent.cpp // -// X*Y image grid, used by GridGameListView. +// X*Y image grid, used by GridGamelistView. // #ifndef ES_CORE_COMPONENTS_IMAGE_GRID_COMPONENT_H diff --git a/es-core/src/renderers/Renderer_GL21.cpp b/es-core/src/renderers/Renderer_GL21.cpp index d755b050c..d80797002 100644 --- a/es-core/src/renderers/Renderer_GL21.cpp +++ b/es-core/src/renderers/Renderer_GL21.cpp @@ -168,7 +168,7 @@ namespace Renderer } unsigned int createTexture(const Texture::Type type, - const Texture::Type format, // Not used for desktop OpenGL. + const Texture::Type /*format*/, const bool linearMinify, const bool linearMagnify, const bool repeat,