Skip to content

Commit

Permalink
・初回起動時に設定画面でOKを押しても設定が保存されないバグを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
amate committed Apr 23, 2021
1 parent 42ae359 commit cca9127
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
13 changes: 5 additions & 8 deletions UmaCruise/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ bool Config::LoadConfig()

void Config::SaveConfig()
{
std::ifstream ifs((GetExeDirectory() / "setting.json").wstring());
if (!ifs) {
ATLASSERT(FALSE);
ERROR_LOG << L"SaveConfig failed: !fs";
return ;
}
json jsonSetting;
ifs >> jsonSetting;
ifs.close();
std::ifstream fs((GetExeDirectory() / "setting.json").wstring());
if (fs) {
fs >> jsonSetting;
}
fs.close();

jsonSetting["Config"]["RefreshInterval"] = refreshInterval;
jsonSetting["Config"]["AutoStart"] = autoStart;
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ v1.3
・現在の日付検出を cutImage と thresImage に限定(CPU負荷対策)
・イベント名のアイコン検出でcv::thresholdに大津二値化からkEventNameIconThreshold指定のTHRES_BINARYへ変更
・リリースビルドではwarning以上のログのみ出力するようにした
・初回起動時に設定画面でOKを押しても設定が保存されないバグを修正


v1.2
Expand Down

0 comments on commit cca9127

Please sign in to comment.