OSDN Git Service

[Implement] #41415 music_debug.cfg の優先読み込み機能追加と music フォルダ内の .gitignore 追加. /
authordeskull <deskull@users.sourceforge.jp>
Wed, 3 Feb 2021 16:47:29 +0000 (01:47 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 3 Feb 2021 16:47:29 +0000 (01:47 +0900)
Added priority loading function for music_debug.cfg and added .gitignore in music folder.

lib/xtra/music/.gitignore [new file with mode: 0644]
src/main-win.c

diff --git a/lib/xtra/music/.gitignore b/lib/xtra/music/.gitignore
new file mode 100644 (file)
index 0000000..bcbd2e7
--- /dev/null
@@ -0,0 +1,5 @@
+/*.wav
+/*.mid
+/*.mp3
+/*.ogg
+/music_debug.cfg
index 9b65dfc..29587e8 100644 (file)
@@ -968,8 +968,12 @@ static void load_music_prefs(void)
     char *zz[SAMPLE_MUSIC_MAX];
     char key[80];
 
-    path_build(ini_path, 1024, ANGBAND_DIR_XTRA_MUSIC, "music.cfg");
-    GetPrivateProfileString("Device", "type", "", mci_device_type, 256, ini_path);
+    path_build(ini_path, 1024, ANGBAND_DIR_XTRA_MUSIC, "music_debug.cfg");
+    if (GetPrivateProfileString("Device", "type", "", mci_device_type, 256, ini_path) == 0) {
+        path_build(ini_path, 1024, ANGBAND_DIR_XTRA_MUSIC, "music.cfg");
+        GetPrivateProfileString("Device", "type", "", mci_device_type, 256, ini_path);
+    }
+
     for (int i = 0; i < MUSIC_BASIC_MAX; i++) {
         GetPrivateProfileString("Basic", angband_music_basic_name[i], "", tmp, 1024, ini_path);
         int num = tokenize_whitespace(tmp, SAMPLE_MUSIC_MAX, zz);