summaryrefslogtreecommitdiff
path: root/src/i_oplmusic.c
diff options
context:
space:
mode:
authorSimon Howard2015-06-08 21:12:26 -0400
committerSimon Howard2015-06-08 21:12:26 -0400
commit25c67b716015e1a5cf9379ffcb7fd6e8a62766c6 (patch)
tree90eeea9b1d4b9de1ba37f122e30153febe11e96d /src/i_oplmusic.c
parente81997d7571cbe9372c4fe66b644d0d9a5059b6f (diff)
downloadchocolate-doom-25c67b716015e1a5cf9379ffcb7fd6e8a62766c6.tar.gz
chocolate-doom-25c67b716015e1a5cf9379ffcb7fd6e8a62766c6.tar.bz2
chocolate-doom-25c67b716015e1a5cf9379ffcb7fd6e8a62766c6.zip
opl: Change result from OPL_Init() to an enum.
This no longer returns a boolean value, but actually returns an integer indicating the type of OPL chip that was detected. Change the return value to have a more meaningful value.
Diffstat (limited to 'src/i_oplmusic.c')
-rw-r--r--src/i_oplmusic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/i_oplmusic.c b/src/i_oplmusic.c
index f98f2c91..239c9794 100644
--- a/src/i_oplmusic.c
+++ b/src/i_oplmusic.c
@@ -1651,12 +1651,12 @@ static void I_OPL_ShutdownMusic(void)
static boolean I_OPL_InitMusic(void)
{
char *dmxoption;
- int opl_chip_type;
+ opl_init_result_t chip_type;
OPL_SetSampleRate(snd_samplerate);
- opl_chip_type = OPL_Init(opl_io_port);
- if (!opl_chip_type)
+ chip_type = OPL_Init(opl_io_port);
+ if (chip_type == OPL_INIT_NONE)
{
printf("Dude. The Adlib isn't responding.\n");
return false;
@@ -1670,7 +1670,7 @@ static boolean I_OPL_InitMusic(void)
dmxoption = snd_dmxoption != NULL ? snd_dmxoption : "";
}
- if (opl_chip_type == 2 && strstr(dmxoption, "-opl3") != NULL)
+ if (chip_type == OPL_INIT_OPL3 && strstr(dmxoption, "-opl3") != NULL)
{
opl_opl3mode = 1;
num_opl_voices = OPL_NUM_VOICES * 2;