mirror of
https://github.com/wiiu-env/launchiine.git
synced 2024-11-22 01:39:18 +01:00
Remove titles from the GuiIconGrid which were removed from the GameList
This commit is contained in:
parent
7ef3e4dc2e
commit
b4cdf11f6a
@ -75,6 +75,28 @@ uint64_t GuiIconGrid::getSelectedGame(void) {
|
|||||||
void GuiIconGrid::OnGameTitleListUpdated(GameList * gameList) {
|
void GuiIconGrid::OnGameTitleListUpdated(GameList * gameList) {
|
||||||
containerMutex.lock();
|
containerMutex.lock();
|
||||||
gameList->lock();
|
gameList->lock();
|
||||||
|
// At first delete the ones that were deleted;
|
||||||
|
auto it = gameInfoContainers.begin();
|
||||||
|
while (it != gameInfoContainers.end()) {
|
||||||
|
bool wasFound = false;
|
||||||
|
for(int32_t i = 0; i < gameList->size(); i++) {
|
||||||
|
gameInfo * info = gameList->at(i);
|
||||||
|
if(info != NULL && info->titleId == it->first) {
|
||||||
|
wasFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!wasFound) {
|
||||||
|
DEBUG_FUNCTION_LINE("Removing %016llX\n", it->first);
|
||||||
|
remove(it->second->button);
|
||||||
|
delete it->second;
|
||||||
|
it = gameInfoContainers.erase(it);
|
||||||
|
} else {
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(int32_t i = 0; i < gameList->size(); i++) {
|
for(int32_t i = 0; i < gameList->size(); i++) {
|
||||||
gameInfo * info = gameList->at(i);
|
gameInfo * info = gameList->at(i);
|
||||||
GameInfoContainer * container = NULL;
|
GameInfoContainer * container = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user