shithub: choc

Download patch

ref: 3282c9f4fb95c2739e772b6b87bd135bfc577595
parent: 56dc1c62fe439af965d6c1cd1a563d41de28d1d6
author: Simon Howard <fraggle@soulsphere.org>
date: Wed Jan 25 16:16:31 EST 2017

setup: Add control for music pack config.

This hooks in the new 'music_pack_path' variable previously added.
Add this into the sound dialog.

This fixes #843.

--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -62,6 +62,7 @@
 static int use_libsamplerate = 0;
 static float libsamplerate_scale = 0.65;
 
+static char *music_pack_path = NULL;
 static char *timidity_cfg_path = NULL;
 static char *gus_patch_path = NULL;
 static int gus_ram_kb = 1024;
@@ -167,7 +168,7 @@
                 TXT_NewLabel("Path to patch files: "),
                 TXT_NewStrut(4, 0),
                 TXT_NewFileSelector(&gus_patch_path, 34,
-                                    "Select path to GUS patches",
+                                    "Select directory containing GUS patches",
                                     TXT_DIRECTORY),
                 NULL)),
 
@@ -180,6 +181,13 @@
                 TXT_NewFileSelector(&timidity_cfg_path, 34,
                                     "Select Timidity config file",
                                     cfg_extension),
+                TXT_NewStrut(4, 0),
+                TXT_NewLabel("Digital music pack directory: "),
+                TXT_NewStrut(4, 0),
+                TXT_NewFileSelector(&music_pack_path, 34,
+                                    "Select directory containing music pack "
+                                    "config files",
+                                    TXT_DIRECTORY),
                 NULL)),
         NULL);
 }
@@ -198,6 +206,7 @@
 
     M_BindIntVariable("gus_ram_kb",               &gus_ram_kb);
     M_BindStringVariable("gus_patch_path",        &gus_patch_path);
+    M_BindStringVariable("music_pack_path",     &music_pack_path);
     M_BindStringVariable("timidity_cfg_path",     &timidity_cfg_path);
 
     M_BindIntVariable("snd_sbport",               &snd_sbport);
@@ -219,6 +228,7 @@
         M_BindIntVariable("show_talk",            &show_talk);
     }
 
+    music_pack_path = M_StringDuplicate("");
     timidity_cfg_path = M_StringDuplicate("");
     gus_patch_path = M_StringDuplicate("");