diff options
author | Simon Howard | 2010-07-28 20:39:07 +0000 |
---|---|---|
committer | Simon Howard | 2010-07-28 20:39:07 +0000 |
commit | 232fba47e0a42af8c3ec0f934eaa855163c4ee35 (patch) | |
tree | 8f346dbddf947cbaab86882d39a9952697610f81 /setup | |
parent | b457a1c95679a878e9508211117b11c53c9e90a4 (diff) | |
download | chocolate-doom-232fba47e0a42af8c3ec0f934eaa855163c4ee35.tar.gz chocolate-doom-232fba47e0a42af8c3ec0f934eaa855163c4ee35.tar.bz2 chocolate-doom-232fba47e0a42af8c3ec0f934eaa855163c4ee35.zip |
Add config file parameter to set OPL I/O port.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1947
Diffstat (limited to 'setup')
-rw-r--r-- | setup/configfile.c | 9 | ||||
-rw-r--r-- | setup/sound.c | 1 | ||||
-rw-r--r-- | setup/sound.h | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/setup/configfile.c b/setup/configfile.c index 97d87aaf..6db7f710 100644 --- a/setup/configfile.c +++ b/setup/configfile.c @@ -154,9 +154,10 @@ static int snd_sbirq = 0; static int snd_sbdma = 0; static int snd_mport = 0; -typedef enum +typedef enum { DEFAULT_INT, + DEFAULT_INT_HEX, DEFAULT_STRING, DEFAULT_FLOAT, DEFAULT_KEY, @@ -269,6 +270,7 @@ static default_t extra_defaults_list[] = {"mouse_acceleration", &mouse_acceleration, DEFAULT_FLOAT, 0, 0}, {"mouse_threshold", &mouse_threshold, DEFAULT_INT, 0, 0}, {"snd_samplerate", &snd_samplerate, DEFAULT_INT, 0, 0}, + {"opl_io_port", &opl_io_port, DEFAULT_INT_HEX, 0, 0}, {"show_endoom", &show_endoom, DEFAULT_INT, 0, 0}, {"vanilla_savegame_limit", &vanilla_savegame_limit, DEFAULT_INT, 0, 0}, {"vanilla_demo_limit", &vanilla_demo_limit, DEFAULT_INT, 0, 0}, @@ -435,6 +437,10 @@ static void SaveDefaultCollection(default_collection_t *collection) fprintf(f, "%i", v); break; + case DEFAULT_INT_HEX: + fprintf(f, "0x%x", * (int *) defaults[i].location); + break; + case DEFAULT_INT: fprintf(f, "%i", * (int *) defaults[i].location); break; @@ -528,6 +534,7 @@ static void LoadDefaultCollection(default_collection_t *collection) break; case DEFAULT_INT: + case DEFAULT_INT_HEX: * (int *) def->location = ParseIntParameter(strparm); break; diff --git a/setup/sound.c b/setup/sound.c index f7a9c6d4..59df0532 100644 --- a/setup/sound.c +++ b/setup/sound.c @@ -65,6 +65,7 @@ int snd_musicdevice = SNDDEVICE_GENMIDI; int musicVolume = 15; int snd_samplerate = 22050; +int opl_io_port = 0x388; int use_libsamplerate = 0; diff --git a/setup/sound.h b/setup/sound.h index 6c366151..eb386d6f 100644 --- a/setup/sound.h +++ b/setup/sound.h @@ -44,6 +44,7 @@ extern int snd_musicdevice; extern int musicVolume; extern int snd_samplerate; +extern int opl_io_port; extern int use_libsamplerate; |