Request user interaction to either retry or cancel.

This commit is contained in:
RadWolfie 2018-06-10 17:16:10 -05:00
parent 63af4166e0
commit 90df98e5e6
1 changed files with 8 additions and 2 deletions

View File

@ -912,6 +912,7 @@ void CxbxKrnlMain(int argc, char* argv[])
SendMessage(CxbxKrnl_hEmuParent, WM_PARENTNOTIFY, WM_USER, ID_KRNL_IS_READY);
}
retryWait:
// Force wait until first allocated process is ready
int waitCounter = 10;
bool isReady = false;
@ -925,7 +926,12 @@ void CxbxKrnlMain(int argc, char* argv[])
Sleep(100);
}
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);