Commit c169dd65 authored by mercury233's avatar mercury233

fix

parent 68038630
...@@ -21,7 +21,7 @@ Replay::~Replay() { ...@@ -21,7 +21,7 @@ Replay::~Replay() {
} }
void Replay::BeginRecord() { void Replay::BeginRecord() {
#ifdef YGOPRO_SERVER_MODE #ifdef YGOPRO_SERVER_MODE
if(ygo::replay_mode == 0) return; if(ygo::replay_mode > 0) {
#endif //YGOPRO_SERVER_MODE #endif //YGOPRO_SERVER_MODE
#ifdef _WIN32 #ifdef _WIN32
if(is_recording) if(is_recording)
...@@ -48,6 +48,9 @@ void Replay::BeginRecord() { ...@@ -48,6 +48,9 @@ void Replay::BeginRecord() {
if(!fp) if(!fp)
return; return;
#endif #endif
#ifdef YGOPRO_SERVER_MODE
}
#endif //YGOPRO_SERVER_MODE
pdata = replay_data; pdata = replay_data;
is_recording = true; is_recording = true;
} }
...@@ -147,13 +150,16 @@ void Replay::EndRecord() { ...@@ -147,13 +150,16 @@ void Replay::EndRecord() {
if(!is_recording) if(!is_recording)
return; return;
#ifdef YGOPRO_SERVER_MODE #ifdef YGOPRO_SERVER_MODE
if(ygo::replay_mode == 0) return; if(ygo::replay_mode > 0) {
#endif //YGOPRO_SERVER_MODE #endif //YGOPRO_SERVER_MODE
#ifdef _WIN32 #ifdef _WIN32
CloseHandle(recording_fp); CloseHandle(recording_fp);
#else #else
fclose(fp); fclose(fp);
#endif #endif
#ifdef YGOPRO_SERVER_MODE
}
#endif //YGOPRO_SERVER_MODE
pheader.datasize = pdata - replay_data; pheader.datasize = pdata - replay_data;
pheader.flag |= REPLAY_COMPRESSED; pheader.flag |= REPLAY_COMPRESSED;
size_t propsize = 5; size_t propsize = 5;
......
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