mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Dialog: Use a thread to init dialogs too.
This commit is contained in:
1 parent
28065c1bc4
commit
429b4594d0
4 files changed
+55
-3
No files matched your search
@@ -75,6 +75,7 @@ void PSPDialog::ChangeStatus(DialogStatus newStatus, int delayUs) {
|
||||
}
|
||||
}
|
||||
status = newStatus;
|
||||
pendingStatus = newStatus;
|
||||
pendingStatusTicks = 0;
|
||||
} else {
|
||||
pendingStatus = newStatus;
|
||||
@@ -93,6 +94,13 @@ void PSPDialog::FinishVolatile() {
|
||||
}
|
||||
}
|
||||
|
||||
int PSPDialog::FinishInit() {
|
||||
if (ReadStatus() != SCE_UTILITY_STATUS_INITIALIZE)
|
||||
return -1;
|
||||
ChangeStatus(SCE_UTILITY_STATUS_RUNNING, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int PSPDialog::FinishShutdown() {
|
||||
if (ReadStatus() != SCE_UTILITY_STATUS_SHUTDOWN)
|
||||
return -1;
|
||||
@@ -101,12 +109,18 @@ int PSPDialog::FinishShutdown() {
|
||||
}
|
||||
|
||||
void PSPDialog::ChangeStatusInit(int delayUs) {
|
||||
status = SCE_UTILITY_STATUS_INITIALIZE;
|
||||
ChangeStatus(SCE_UTILITY_STATUS_RUNNING, delayUs);
|
||||
ChangeStatus(SCE_UTILITY_STATUS_INITIALIZE, 0);
|
||||
|
||||
auto params = GetCommonParam();
|
||||
if (params)
|
||||
UtilityDialogInitialize(DialogType(), delayUs, params->accessThread);
|
||||
else
|
||||
ChangeStatus(SCE_UTILITY_STATUS_RUNNING, delayUs);
|
||||
}
|
||||
|
||||
void PSPDialog::ChangeStatusShutdown(int delayUs) {
|
||||
status = SCE_UTILITY_STATUS_SHUTDOWN;
|
||||
ChangeStatus(SCE_UTILITY_STATUS_SHUTDOWN, 0);
|
||||
|
||||
auto params = GetCommonParam();
|
||||
if (params)
|
||||
UtilityDialogShutdown(DialogType(), delayUs, params->accessThread);
|
||||
|
||||
Reference in new issue
Block a user