"reenable" midi support

well it was never really disabled, but like this we can atleast change its volume lel
menu entry is still disabled, i dont think theres a single map with midi music, so this would just clutter the menu
This commit is contained in:
Alug committed 2025-08-08 00:48:41 +02:00
1 parent 2e4eec174e
commit 1dcfb2929e
3 files changed
+16 -4

No files matched your search

+2 -1
View File
@@ -650,7 +650,8 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
#define NOCLIPCAM
/// SRB2Kart: MIDI support is shitty and busted and we don't want it, lets throw it behind a define
#define NO_MIDI
// yall didnt properly disable it so it always worked lol (:
//#define NO_MIDI
/// Sprite rotation
#define ROTSPRITE
+4 -2
View File
@@ -1075,7 +1075,8 @@ static menuitem_t OP_SoundOptionsMenu[] =
{IT_STRING|IT_CVAR|IT_CV_NOPRINT, NULL, "Music", &cv_gamedigimusic, 30},
{IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "Music Volume", &cv_digmusicvolume, 38},
#ifndef NO_MIDI
//#ifndef NO_MIDI
#if 0
{IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "MIDI Volume", &cv_midimusicvolume, 46},
{IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 60},
@@ -1110,7 +1111,8 @@ static const char* OP_SoundTooltips[] =
"Volume of Sound effects.",
"Turn Music on or off.",
"Volume of Music.",
#ifndef NO_MIDI
//#ifndef NO_MIDI
#if 0
"Volume of Midi Music.",
#endif
"Reverse left and right channels of audio.",
+10 -1
View File
@@ -1633,10 +1633,20 @@ static lumpnum_t S_GetMusicLumpNum(const char *mname)
if (S_MusicExists(mname, false, true)) // check non midis first
return W_GetNumForName(va("o_%s", mname));
else if (S_MusicExists(mname, true, false))
{
#ifdef NO_MIDI
CONS_Alert(CONS_ERROR, "A MIDI music lump %.6s was found,\nbut SRB2Kart does not support MIDI output.\nWe apologise for the inconvenience.\n", mname);
return LUMPERROR;
#else
return W_GetNumForName(va("d_%s", mname));
#endif
}
CONS_Alert(CONS_ERROR, "Music %.6s could not be loaded: lump not found!\n", mname);
return LUMPERROR;
}
static boolean S_LoadMusic(const char *mname)
{
lumpnum_t mlumpnum;
@@ -1649,7 +1659,6 @@ static boolean S_LoadMusic(const char *mname)
if (mlumpnum == LUMPERROR)
{
CONS_Alert(CONS_ERROR, "Music %.6s could not be loaded: lump not found!\n", mname);
return false;
}