Commit 6cd6a736 authored by nanahira's avatar nanahira

add config migration thing

parent 1595ed96
......@@ -1399,6 +1399,11 @@ bool Game::LoadConfigFromFile(const char* file) {
} else if(!strcmp(strbuf, "lasthost")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.lasthost, 100);
} else if(!strcmp(strbuf, "lastport")) { // for config migration
BufferIO::DecodeUTF8(valbuf, wstr);
wchar_t tmpLastHost[100];
BufferIO::CopyWStr(gameConf.lasthost, tmpLastHost, 100);
myswprintf(gameConf.lasthost, L"%ls:%ls", tmpLastHost, wstr);
} else if(!strcmp(strbuf, "roompass")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.roompass, 20);
......
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