Commit 1309fb25 authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/Fluorohydride/ygopro into resize

parents f9e269c3 1af7ff22
...@@ -726,7 +726,7 @@ void Game::MainLoop() { ...@@ -726,7 +726,7 @@ void Game::MainLoop() {
atkdy = (float)sin(atkframe); atkdy = (float)sin(atkframe);
driver->beginScene(true, true, SColor(0, 0, 0, 0)); driver->beginScene(true, true, SColor(0, 0, 0, 0));
gMutex.Lock(); gMutex.Lock();
if(dInfo.isStarted || dInfo.isReplaySkiping) { if(dInfo.isStarted) {
if(dInfo.isFinished && showcardcode == 1) if(dInfo.isFinished && showcardcode == 1)
soundManager.PlayBGM(BGM_WIN); soundManager.PlayBGM(BGM_WIN);
else if(dInfo.isFinished && (showcardcode == 2 || showcardcode == 3)) else if(dInfo.isFinished && (showcardcode == 2 || showcardcode == 3))
......
...@@ -106,6 +106,7 @@ int ReplayMode::ReplayThread(void* param) { ...@@ -106,6 +106,7 @@ int ReplayMode::ReplayThread(void* param) {
get_message(pduel, (byte*)engineBuffer); get_message(pduel, (byte*)engineBuffer);
is_continuing = ReplayAnalyze(engineBuffer, len); is_continuing = ReplayAnalyze(engineBuffer, len);
if(is_restarting) { if(is_restarting) {
mainGame->gMutex.Lock();
is_restarting = false; is_restarting = false;
int step = current_step - 1; int step = current_step - 1;
if(step < 0) if(step < 0)
...@@ -280,7 +281,6 @@ void ReplayMode::Undo() { ...@@ -280,7 +281,6 @@ void ReplayMode::Undo() {
return; return;
mainGame->dInfo.isReplaySkiping = true; mainGame->dInfo.isReplaySkiping = true;
Restart(false); Restart(false);
mainGame->gMutex.Lock();
Pause(false, false); Pause(false, false);
} }
bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
......
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