Commit 24d06107 authored by nanahira's avatar nanahira

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

parents 7305659c 48b01b83
...@@ -1502,8 +1502,6 @@ bool Game::LoadConfigFromFile(const char* file) { ...@@ -1502,8 +1502,6 @@ bool Game::LoadConfigFromFile(const char* file) {
BufferIO::DecodeUTF8(valbuf, gameConf.lasthost); BufferIO::DecodeUTF8(valbuf, gameConf.lasthost);
} else if(!std::strcmp(strbuf, "lastport")) { } else if(!std::strcmp(strbuf, "lastport")) {
BufferIO::DecodeUTF8(valbuf, gameConf.lastport); BufferIO::DecodeUTF8(valbuf, gameConf.lastport);
} else if(!std::strcmp(strbuf, "roompass")) {
BufferIO::DecodeUTF8(valbuf, gameConf.roompass);
} else if(!std::strcmp(strbuf, "automonsterpos")) { } else if(!std::strcmp(strbuf, "automonsterpos")) {
gameConf.chkMAutoPos = strtol(valbuf, nullptr, 10); gameConf.chkMAutoPos = strtol(valbuf, nullptr, 10);
} else if(!std::strcmp(strbuf, "autospellpos")) { } else if(!std::strcmp(strbuf, "autospellpos")) {
...@@ -1769,7 +1767,10 @@ void Game::SaveConfig() { ...@@ -1769,7 +1767,10 @@ void Game::SaveConfig() {
fprintf(fp, "serverport = %d\n", gameConf.serverport); fprintf(fp, "serverport = %d\n", gameConf.serverport);
BufferIO::EncodeUTF8(gameConf.lasthost, linebuf); BufferIO::EncodeUTF8(gameConf.lasthost, linebuf);
fprintf(fp, "lasthost = %s\n", linebuf); fprintf(fp, "lasthost = %s\n", linebuf);
fprintf(fp, "lastport = %d\n", gameConf.lastport); BufferIO::EncodeUTF8(gameConf.lastport, linebuf);
fprintf(fp, "lastport = %s\n", linebuf);
BufferIO::EncodeUTF8(gameConf.roompass, linebuf);
fprintf(fp, "roompass = %s\n", linebuf);
//settings //settings
fprintf(fp, "automonsterpos = %d\n", (chkMAutoPos->isChecked() ? 1 : 0)); fprintf(fp, "automonsterpos = %d\n", (chkMAutoPos->isChecked() ? 1 : 0));
fprintf(fp, "autospellpos = %d\n", (chkSTAutoPos->isChecked() ? 1 : 0)); fprintf(fp, "autospellpos = %d\n", (chkSTAutoPos->isChecked() ? 1 : 0));
......
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