Commit f9ef2974 authored by DailyShana's avatar DailyShana

retry in single mode

parent 1849c130
......@@ -899,8 +899,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait();
select_hint = last_select_hint;
ClientAnalyze(last_successful_msg, last_successful_msg_length);
break;
return ClientAnalyze(last_successful_msg, last_successful_msg_length);
}
mainGame->gMutex.Lock();
mainGame->stMessage->setText(L"Error occurs.");
......@@ -908,6 +907,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait();
if(!mainGame->dInfo.isSingleMode) {
mainGame->closeDoneSignal.Reset();
mainGame->closeSignal.Set();
mainGame->closeDoneSignal.Wait();
......@@ -929,6 +929,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
event_base_loopbreak(client_base);
if(exit_on_return)
mainGame->device->closeDevice();
}
return false;
}
case MSG_HINT: {
......
......@@ -177,13 +177,11 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
mainGame->dInfo.curMsg = BufferIO::ReadUInt8(pbuf);
switch (mainGame->dInfo.curMsg) {
case MSG_RETRY: {
mainGame->gMutex.Lock();
mainGame->stMessage->setText(L"Error occurs.");
mainGame->PopupElement(mainGame->wMessage);
mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait();
return false;
if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) {
mainGame->singleSignal.Reset();
mainGame->singleSignal.Wait();
}
break;
}
case MSG_HINT: {
/*int type = */BufferIO::ReadInt8(pbuf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment