From 88e3d964a3e8468f5f62934d62efe324559ccb45 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Thu, 1 Jan 2026 23:05:59 -0500 Subject: [PATCH] Apply this to the st_stuff version as well --- src/st_stuff.c | 35 +++++++++++++++++++++++++++++++++-- src/y_inter.c | 4 ++-- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 383d978e1..13c5359d5 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1030,12 +1030,43 @@ void ST_Drawer(void) switch (demo.savemode) { case DSM_NOTSAVING: - V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_HUDTRANS|V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|gtc, "Look Backward: Save replay"); + { + char replaytext[40] = {0}; + INT32 flags = 0; + const char *item1 = gamecontrol[0][gc_lookback][0] != 0 ? G_KeynumToString(gamecontrol[0][gc_lookback][0]) : NULL; + const char *item2 = gamecontrol[0][gc_lookback][1] != 0 ? G_KeynumToString(gamecontrol[0][gc_lookback][1]) : NULL; + + if (item1 != NULL && item2 != NULL) + { + flags |= V_6WIDTHSPACE; + snprintf(replaytext, 40, "%s/%s: Save Replay", item1, item2); + } + else + snprintf(replaytext, 40, "%s: Save Replay", item1 != NULL ? item1 : item2 != NULL ? item2 : "Look Backwards"); + + + V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|gtc|flags, replaytext); break; + } case DSM_WILLAUTOSAVE: - V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_HUDTRANS|V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|gtc, "Replay will be saved. (Look Backward: Change title)"); + { + char replaytext[100] = {0}; + INT32 flags = 0; + const char *item1 = gamecontrol[0][gc_lookback][0] != 0 ? G_KeynumToString(gamecontrol[0][gc_lookback][0]) : NULL; + const char *item2 = gamecontrol[0][gc_lookback][1] != 0 ? G_KeynumToString(gamecontrol[0][gc_lookback][1]) : NULL; + + if (item1 != NULL && item2 != NULL) + { + flags |= V_6WIDTHSPACE; + snprintf(replaytext, 100, "Replay will be saved. (%s/%s: Change title)", item1, item2); + } + else + snprintf(replaytext, 100, "Replay will be saved. (%s: Change title)", item1 != NULL ? item1 : item2 != NULL ? item2 : "Look Backwards"); + + V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_HUDTRANS|V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|gtc|flags, replaytext); break; + } case DSM_WILLSAVE: V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, 2, V_HUDTRANS|V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE|gtc, "Replay will be saved."); diff --git a/src/y_inter.c b/src/y_inter.c index 8d0aeaa90..682bc035c 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -824,8 +824,8 @@ skiptallydrawer: { char replaytext[40] = {0}; INT32 flags = 0; - const char *item1 = gamecontrol[0][gc_fire][0] != 0 ? G_KeynumToString(gamecontrol[0][gc_lookback][0]) : NULL; - const char *item2 = gamecontrol[0][gc_fire][1] != 0 ? G_KeynumToString(gamecontrol[0][gc_lookback][1]) : NULL; + const char *item1 = gamecontrol[0][gc_lookback][0] != 0 ? G_KeynumToString(gamecontrol[0][gc_lookback][0]) : NULL; + const char *item2 = gamecontrol[0][gc_lookback][1] != 0 ? G_KeynumToString(gamecontrol[0][gc_lookback][1]) : NULL; if (item1 != NULL && item2 != NULL) {