From 641e397625b9ca2d21e2577ff1002c3d55052aad Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 1 May 2024 14:50:05 +0100 Subject: [PATCH 1/2] Always show author on song credit, even if it's wider than we'd like Credit is more important than aesthetic --- src/s_sound.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/s_sound.c b/src/s_sound.c index c4d1993bf..237ec1a33 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2195,7 +2195,7 @@ void S_LoadMusicCredit(void) widthused -= V_ThinStringWidth(credittext, 0); -#define MUSICCREDITAPPEND(field)\ +#define MUSICCREDITAPPEND(field, force)\ if (field)\ {\ work = va(" - %s", field);\ @@ -2203,7 +2203,7 @@ void S_LoadMusicCredit(void) if (worklen <= len)\ {\ workwidth = V_ThinStringWidth(work, 0);\ - if (widthused >= workwidth)\ + if (force || widthused >= workwidth)\ {\ strncat(credittext, work, len);\ len -= worklen;\ @@ -2212,8 +2212,8 @@ void S_LoadMusicCredit(void) }\ } - MUSICCREDITAPPEND(def->author); - MUSICCREDITAPPEND(def->source); + MUSICCREDITAPPEND(def->author, true); + MUSICCREDITAPPEND(def->source, false); #undef MUSICCREDITAPPEND } From 68ee11807894f7633d91f17ee1436c3cd1d1a542 Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 1 May 2024 15:02:06 +0100 Subject: [PATCH 2/2] Wordwrap the original composers field on the Stereo, so that nobody gets cut off --- src/k_menudraw.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 812b979f6..bb9726f9a 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -8833,7 +8833,16 @@ void M_DrawSoundTest(void) if (soundtest.current->source) V_DrawThinString(x+1, (y += 10), 0, soundtest.current->source); if (soundtest.current->composers) - V_DrawThinString(x+1, (y += 10), 0, soundtest.current->composers); + { + char *wrappedcomposers = V_ScaledWordWrap( + (BASEVIDWIDTH - ((x+1)*2)) << FRACBITS, + FRACUNIT, FRACUNIT, FRACUNIT, + 0, TINY_FONT, + soundtest.current->composers + ); + V_DrawThinString(x+1, (y += 10), 0, wrappedcomposers); + Z_Free(wrappedcomposers); + } } else {