Fix title menu not working if you leave a replay early

This commit is contained in:
fickleheart 2019-04-06 18:17:56 -05:00
parent aaa6418981
commit 1eff7bfbe8
1 changed files with 15 additions and 1 deletions

View File

@ -352,6 +352,7 @@ static void M_PlaybackFastForward(INT32 choice);
static void M_PlaybackAdvance(INT32 choice);
static void M_PlaybackSetViews(INT32 choice);
static void M_PlaybackAdjustView(INT32 choice);
static void M_PlaybackQuit(INT32 choice);
// Drawing functions
static void M_DrawGenericMenu(void);
@ -583,7 +584,7 @@ static menuitem_t PlaybackMenu[] =
{IT_ARROWS | IT_STRING, "M_PNVIEW", "Viewpoint 4", M_PlaybackAdjustView, 144},
{IT_CALL | IT_STRING, "M_POPTS", "More Options...", M_ReplayHut, 168},
{IT_CALL | IT_STRING, "M_PEXIT", "Stop Playback", M_ReplayHut, 184},
{IT_CALL | IT_STRING, "M_PEXIT", "Stop Playback", M_PlaybackQuit, 184},
};
typedef enum
{
@ -5864,6 +5865,19 @@ static void M_PlaybackAdjustView(INT32 choice)
G_AdjustView(itemOn - playback_viewcount, (choice > 0) ? 1 : -1, true);
}
static void M_PlaybackQuit(INT32 choice)
{
(void)choice;
G_StopDemo();
if (demo.inreplayhut)
M_ReplayHut(choice);
else if (modeattacking)
S_ChangeMusicInternal("racent", true); // ???
else
D_StartTitle();
}
static void M_PandorasBox(INT32 choice)
{
(void)choice;