mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
UI: Prevent crash installing second game quickly.
This commit is contained in:
parent
248ea42a58
commit
40cab56bb9
2 changed files with 3 additions and 3 deletions
|
@ -278,7 +278,7 @@ ZipFileContents DetectZipFileContents(struct zip *z, ZipFileInfo *info) {
|
|||
|
||||
// Parameters need to be by value, since this is a thread func.
|
||||
bool GameManager::InstallGame(Path url, Path fileName, bool deleteAfter) {
|
||||
if (installInProgress_) {
|
||||
if (installInProgress_ || installDonePending_) {
|
||||
ERROR_LOG(HLE, "Cannot have two installs in progress at the same time");
|
||||
return false;
|
||||
}
|
||||
|
@ -708,7 +708,7 @@ bool GameManager::InstallZippedISO(struct zip *z, int isoFileIndex, const Path &
|
|||
}
|
||||
|
||||
bool GameManager::InstallGameOnThread(const Path &url, const Path &fileName, bool deleteAfter) {
|
||||
if (installInProgress_) {
|
||||
if (installInProgress_ || installDonePending_) {
|
||||
return false;
|
||||
}
|
||||
installThread_.reset(new std::thread(std::bind(&GameManager::InstallGame, this, url, fileName, deleteAfter)));
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
void Update();
|
||||
|
||||
GameManagerState GetState() {
|
||||
if (installInProgress_)
|
||||
if (installInProgress_ || installDonePending_)
|
||||
return GameManagerState::INSTALLING;
|
||||
if (curDownload_)
|
||||
return GameManagerState::DOWNLOADING;
|
||||
|
|
Loading…
Add table
Reference in a new issue