Commit 5a92cb1d authored by mercury233's avatar mercury233

fix loading single

parent f2be3a86
...@@ -56,10 +56,15 @@ int SingleMode::SinglePlayThread(void* param) { ...@@ -56,10 +56,15 @@ int SingleMode::SinglePlayThread(void* param) {
BufferIO::CopyWStr(mainGame->ebNickName->getText(), mainGame->dInfo.hostname, 20); BufferIO::CopyWStr(mainGame->ebNickName->getText(), mainGame->dInfo.hostname, 20);
mainGame->dInfo.clientname[0] = 0; mainGame->dInfo.clientname[0] = 0;
mainGame->dInfo.turn = 0; mainGame->dInfo.turn = 0;
if(!preload_script(pduel, fname2, slen)) {
wchar_t fname[256];
myswprintf(fname, L"./single/%ls", open_file_name);
slen = BufferIO::EncodeUTF8(fname, fname2);
if(!preload_script(pduel, fname2, slen)) { if(!preload_script(pduel, fname2, slen)) {
end_duel(pduel); end_duel(pduel);
return 0; return 0;
} }
}
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->HideElement(mainGame->wSinglePlay); mainGame->HideElement(mainGame->wSinglePlay);
mainGame->wCardImg->setVisible(true); mainGame->wCardImg->setVisible(true);
......
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