Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-2pick
Commits
f9ef2974
Commit
f9ef2974
authored
Jun 24, 2019
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
retry in single mode
parent
1849c130
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
30 deletions
+29
-30
gframe/duelclient.cpp
gframe/duelclient.cpp
+24
-23
gframe/single_mode.cpp
gframe/single_mode.cpp
+5
-7
No files found.
gframe/duelclient.cpp
View file @
f9ef2974
...
...
@@ -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,27 +907,29 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Unlock
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Wait
();
mainGame
->
closeDoneSignal
.
Reset
();
mainGame
->
closeSignal
.
Set
();
mainGame
->
closeDoneSignal
.
Wait
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isFinished
=
false
;
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
btnStartBot
->
setEnabled
(
true
);
mainGame
->
btnBotCancel
->
setEnabled
(
true
);
mainGame
->
stTip
->
setVisible
(
false
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
if
(
bot_mode
)
mainGame
->
ShowElement
(
mainGame
->
wSinglePlay
);
else
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
mainGame
->
gMutex
.
Unlock
();
event_base_loopbreak
(
client_base
);
if
(
exit_on_return
)
mainGame
->
device
->
closeDevice
();
if
(
!
mainGame
->
dInfo
.
isSingleMode
)
{
mainGame
->
closeDoneSignal
.
Reset
();
mainGame
->
closeSignal
.
Set
();
mainGame
->
closeDoneSignal
.
Wait
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isFinished
=
false
;
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
btnStartBot
->
setEnabled
(
true
);
mainGame
->
btnBotCancel
->
setEnabled
(
true
);
mainGame
->
stTip
->
setVisible
(
false
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
if
(
bot_mode
)
mainGame
->
ShowElement
(
mainGame
->
wSinglePlay
);
else
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
mainGame
->
gMutex
.
Unlock
();
event_base_loopbreak
(
client_base
);
if
(
exit_on_return
)
mainGame
->
device
->
closeDevice
();
}
return
false
;
}
case
MSG_HINT
:
{
...
...
gframe/single_mode.cpp
View file @
f9ef2974
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment