Merge pull request #11621 from deReeperJosh/skylandersfilefix

Skylander Portal: Clearing and Reloading fix
This commit is contained in:
Mai 2023-03-07 15:24:46 -05:00 committed by GitHub
commit 16023ece6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -1236,6 +1236,12 @@ bool SkylanderPortal::RemoveSkylander(u8 sky_num)
std::lock_guard lock(sky_mutex);
auto& skylander = skylanders[sky_num];
if (skylander.sky_file.IsOpen())
{
skylander.Save();
skylander.sky_file.Close();
}
if (skylander.status & 1)
{
skylander.status = Skylander::REMOVING;

View File

@ -332,7 +332,6 @@ void SkylanderPortalWindow::ClearSkylander(u8 slot)
QMessageBox::Ok);
return;
}
system.GetSkylanderPortal().RemoveSkylander(slot_infos->portal_slot);
m_sky_slots[slot].reset();
UpdateEdits();
}