OSDN Git Service

[Implement] #41487 #41415と同様に、効果音設定もDEBUG用と通常用の読み分け処理を追加した / Added a branch in order...
authorHourier <hourier@users.sourceforge.jp>
Sat, 6 Feb 2021 07:24:10 +0000 (16:24 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sat, 6 Feb 2021 07:25:01 +0000 (16:25 +0900)
lib/xtra/sound/.gitignore [new file with mode: 0644]
src/main-win.c

diff --git a/lib/xtra/sound/.gitignore b/lib/xtra/sound/.gitignore
new file mode 100644 (file)
index 0000000..3706e3d
--- /dev/null
@@ -0,0 +1,5 @@
+/*.wav
+/*.mid
+/*.mp3
+/*.ogg
+/sound_debug.cfg
index 5653dd5..858dd74 100644 (file)
@@ -947,15 +947,17 @@ static void load_sound_prefs(void)
     char wav_path[1024];
     char *zz[SAMPLE_SOUND_MAX];
 
-    path_build(ini_path, 1024, ANGBAND_DIR_XTRA_SOUND, "sound.cfg");
+    path_build(ini_path, 1024, ANGBAND_DIR_XTRA_SOUND, "sound_debug.cfg");
+    if (GetPrivateProfileString("Device", "type", "", mci_device_type, 256, ini_path) == 0) {
+        path_build(ini_path, 1024, ANGBAND_DIR_XTRA_MUSIC, "sound.cfg");
+        GetPrivateProfileString("Device", "type", "", mci_device_type, 256, ini_path);
+    }
+
     for (int i = 0; i < SOUND_MAX; i++) {
         GetPrivateProfileString("Sound", angband_sound_name[i], "", tmp, 1024, ini_path);
         int num = tokenize_whitespace(tmp, SAMPLE_SOUND_MAX, zz);
         for (int j = 0; j < num; j++) {
-            /* Access the sound */
             path_build(wav_path, 1024, ANGBAND_DIR_XTRA_SOUND, zz[j]);
-
-            /* Save the sound filename, if it exists */
             if (check_file(wav_path))
                 sound_file[i][j] = string_make(zz[j]);
         }