summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hexen/h2_main.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c
index 66dc535e..23131e9b 100644
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -186,6 +186,40 @@ static void D_SetDefaultSavePath(void)
}
}
+// The Mac version of the Hexen IWAD is different to the "normal" DOS
+// version - it doesn't include lumps used by the DOS DMX library.
+// This means that we can't do GUS or OPL emulation and need to apply
+// a workaround.
+static void AdjustForMacIWAD(void)
+{
+ boolean adjust_music = false;
+
+ switch (snd_musicdevice)
+ {
+ case SNDDEVICE_ADLIB:
+ case SNDDEVICE_SB:
+ adjust_music = W_CheckNumForName("GENMIDI") < 0;
+ break;
+
+ case SNDDEVICE_GUS:
+ adjust_music = W_CheckNumForName("DMXGUS") < 0;
+ break;
+
+ default:
+ break;
+ }
+
+ if (adjust_music)
+ {
+ printf("** Note: You appear to be using the Mac version of the Hexen\n"
+ "** IWAD file. This is missing the lumps required for OPL or\n"
+ "** GUS emulation. Your music configuration is being adjusted\n"
+ "** to a different setting that won't cause the game to "
+ "crash.\n");
+ snd_musicdevice = SNDDEVICE_GENMIDI;
+ }
+}
+
//
// D_GrabMouseCallback
//
@@ -297,6 +331,7 @@ void D_DoomMain(void)
D_AddFile(iwadfile);
W_CheckCorrectIWAD(hexen);
+ AdjustForMacIWAD();
HandleArgs();