Skip to content

Commit

Permalink
check sound file existences
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Apr 4, 2024
1 parent 12638ff commit 61fc34c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1229,13 +1229,19 @@ bool __fastcall XgLoadSettings(void)
}

if (!app_key.QuerySz(L"SoundFile0", sz, _countof(sz))) {
StringCchCopy(xg_aszSoundFiles[0], _countof(xg_aszSoundFiles[0]), sz);
if (PathFileExistsW(sz)) {
StringCchCopy(xg_aszSoundFiles[0], _countof(xg_aszSoundFiles[0]), sz);
}
}
if (!app_key.QuerySz(L"SoundFile1", sz, _countof(sz))) {
StringCchCopy(xg_aszSoundFiles[1], _countof(xg_aszSoundFiles[1]), sz);
if (PathFileExistsW(sz)) {
StringCchCopy(xg_aszSoundFiles[1], _countof(xg_aszSoundFiles[1]), sz);
}
}
if (!app_key.QuerySz(L"SoundFile2", sz, _countof(sz))) {
StringCchCopy(xg_aszSoundFiles[2], _countof(xg_aszSoundFiles[2]), sz);
if (PathFileExistsW(sz)) {
StringCchCopy(xg_aszSoundFiles[2], _countof(xg_aszSoundFiles[2]), sz);
}
}

// 保存先のリストを取得する。
Expand Down

0 comments on commit 61fc34c

Please sign in to comment.