Request user interaction to either retry or cancel.
This commit is contained in:
parent
63af4166e0
commit
90df98e5e6
|
@ -912,6 +912,7 @@ void CxbxKrnlMain(int argc, char* argv[])
|
||||||
SendMessage(CxbxKrnl_hEmuParent, WM_PARENTNOTIFY, WM_USER, ID_KRNL_IS_READY);
|
SendMessage(CxbxKrnl_hEmuParent, WM_PARENTNOTIFY, WM_USER, ID_KRNL_IS_READY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
retryWait:
|
||||||
// Force wait until first allocated process is ready
|
// Force wait until first allocated process is ready
|
||||||
int waitCounter = 10;
|
int waitCounter = 10;
|
||||||
bool isReady = false;
|
bool isReady = false;
|
||||||
|
@ -925,7 +926,12 @@ void CxbxKrnlMain(int argc, char* argv[])
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
}
|
}
|
||||||
if (!isReady) {
|
if (!isReady) {
|
||||||
CxbxKrnlCleanup("GUI process is not ready!");
|
EmuWarning("GUI process is not ready!");
|
||||||
|
int mbRet = MessageBox(NULL, "GUI process is not ready, do you wish to retry?", TEXT("Cxbx-Reloaded"),
|
||||||
|
MB_ICONWARNING | MB_RETRYCANCEL | MB_TOPMOST | MB_SETFOREGROUND);
|
||||||
|
if (mbRet == IDRETRY) {
|
||||||
|
goto retryWait;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
g_EmuShared->SetIsReady(false);
|
g_EmuShared->SetIsReady(false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue