mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Merge branch 'stereo-tidy' into 'master'
Memory fixes for Stereo See merge request KartKrew/Kart!1284
This commit is contained in:
commit
5eeb29d552
2 changed files with 14 additions and 1 deletions
|
|
@ -6142,6 +6142,8 @@ void M_DrawSoundTest(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
titletext = soundtest.current->title;
|
titletext = soundtest.current->title;
|
||||||
|
if (!titletext)
|
||||||
|
titletext = "Untitled"; // Har har.
|
||||||
|
|
||||||
V_DrawThinString(x+1, y, V_ALLOWLOWERCASE|V_6WIDTHSPACE, titletext);
|
V_DrawThinString(x+1, y, V_ALLOWLOWERCASE|V_6WIDTHSPACE, titletext);
|
||||||
if (soundtest.current->numtracks > 1)
|
if (soundtest.current->numtracks > 1)
|
||||||
|
|
|
||||||
|
|
@ -1492,7 +1492,16 @@ void S_PopulateSoundTestSequence(void)
|
||||||
S_InsertMapIntoSoundTestSequence(i, &tail);
|
S_InsertMapIntoSoundTestSequence(i, &tail);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally, we insert all important musicdefs at the head,
|
// Okay, guarantee the list ends on NULL! This stops
|
||||||
|
// that pointing to either invalid memory in general,
|
||||||
|
// or valid memory that is already somewhere else in
|
||||||
|
// the sound test sequence (way more likely).
|
||||||
|
// (We do this here so that inserting unimportant,
|
||||||
|
// mapless musicdefs does not get overwritten, like it
|
||||||
|
// would be if this were done after the below block.)
|
||||||
|
*tail = NULL;
|
||||||
|
|
||||||
|
// Finally, we insert all important musicdefs at the head,
|
||||||
// and all others at the tail.
|
// and all others at the tail.
|
||||||
// It's being added to the sequence in reverse order...
|
// It's being added to the sequence in reverse order...
|
||||||
// but because musicdefstart is ALSO populated in reverse,
|
// but because musicdefstart is ALSO populated in reverse,
|
||||||
|
|
@ -2133,6 +2142,8 @@ void S_ShowMusicCredit(void)
|
||||||
|
|
||||||
if (!def->title)
|
if (!def->title)
|
||||||
{
|
{
|
||||||
|
// Like showing a blank credit.
|
||||||
|
S_StopMusicCredit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue