mirror of
https://github.com/wiiu-env/launchiine.git
synced 2024-11-22 01:39:18 +01:00
Use existing free slots before adding them to the back
This commit is contained in:
parent
3e37d5aa46
commit
4d2f1aea3e
@ -476,7 +476,17 @@ void GuiIconGrid::OnGameTitleAdded(gameInfo * info) {
|
|||||||
this->append(button);
|
this->append(button);
|
||||||
|
|
||||||
positionMutex.lock();
|
positionMutex.lock();
|
||||||
|
bool foundFreePlace = false;
|
||||||
|
for(uint32_t i = 0; i < position.size(); i++) {
|
||||||
|
if(position[i] == 0) {
|
||||||
|
position[i] = info->titleId;
|
||||||
|
foundFreePlace = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!foundFreePlace) {
|
||||||
position.push_back(info->titleId);
|
position.push_back(info->titleId);
|
||||||
|
}
|
||||||
positionMutex.unlock();
|
positionMutex.unlock();
|
||||||
|
|
||||||
bUpdatePositions = true;
|
bUpdatePositions = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user