diff --git a/src/game/GameList.cpp b/src/game/GameList.cpp index 9822c99..a9c71a8 100644 --- a/src/game/GameList.cpp +++ b/src/game/GameList.cpp @@ -82,7 +82,7 @@ int32_t GameList::readGameList() { } for (auto title_candidate : titles) { - if((title_candidate.titleId & 0xFFFFFFFF00000000L) == 0x0005000000000000L) { + if(true || (title_candidate.titleId & 0xFFFFFFFF00000000L) == 0x0005000000000000L) { gameInfo* newGameInfo = new gameInfo; newGameInfo->titleId = title_candidate.titleId; newGameInfo->gamePath = title_candidate.path; @@ -101,6 +101,12 @@ int32_t GameList::readGameList() { for (uint32_t i = 0; i < fullGameList.size(); ++i) { gameInfo *header = fullGameList[i]; + DCFlushRange(&stopAsyncLoading, sizeof(stopAsyncLoading)); + if(stopAsyncLoading) { + DEBUG_FUNCTION_LINE("Stop async title loading\n"); + break; + } + DEBUG_FUNCTION_LINE("Load extra infos of %016llX\n",header->titleId); ACPMetaXml* meta = (ACPMetaXml*)calloc(1, 0x4000); //TODO fix wut if(meta) { diff --git a/src/game/GameList.h b/src/game/GameList.h index b7c469f..8b8d8a2 100644 --- a/src/game/GameList.h +++ b/src/game/GameList.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -19,6 +20,8 @@ class GameList { public: GameList() : selectedGame(0) { }; ~GameList() { + stopAsyncLoading = true; + DCFlushRange(&stopAsyncLoading, sizeof(stopAsyncLoading)); clear(); }; @@ -134,6 +137,8 @@ protected: std::vector fullGameList; std::recursive_mutex _lock; + + bool stopAsyncLoading = false; }; #endif