Commit 753a57a0 authored by fallenstardust's avatar fallenstardust

sync GUI

parent df7132fa
...@@ -308,7 +308,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -308,7 +308,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
NetServer::StopServer(); NetServer::StopServer();
break; break;
} }
STARTUPINFO si; STARTUPINFOW si;
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si)); ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si); si.cb = sizeof(si);
......
...@@ -17,6 +17,8 @@ Replay::~Replay() { ...@@ -17,6 +17,8 @@ Replay::~Replay() {
delete[] comp_data; delete[] comp_data;
} }
void Replay::BeginRecord() { void Replay::BeginRecord() {
if(!FileSystem::IsDirExists(L"./replay") && !FileSystem::MakeDir(L"./replay"))
return;
#ifdef _WIN32 #ifdef _WIN32
if(is_recording) if(is_recording)
CloseHandle(recording_fp); CloseHandle(recording_fp);
...@@ -123,6 +125,8 @@ void Replay::EndRecord() { ...@@ -123,6 +125,8 @@ void Replay::EndRecord() {
is_recording = false; is_recording = false;
} }
void Replay::SaveReplay(const wchar_t* name) { void Replay::SaveReplay(const wchar_t* name) {
if(!FileSystem::IsDirExists(L"./replay") && !FileSystem::MakeDir(L"./replay"))
return;
wchar_t fname[256]; wchar_t fname[256];
myswprintf(fname, L"./replay/%ls.yrp", name); myswprintf(fname, L"./replay/%ls.yrp", name);
#ifdef WIN32 #ifdef WIN32
......
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