Skip to content

Commit

Permalink
Fix demo exit
Browse files Browse the repository at this point in the history
  • Loading branch information
viciious committed Oct 5, 2024
1 parent ca3a8c4 commit 6bd793c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@ void RunMenu (void)
#ifdef MARS
M_Start();
if (!gameinfo.noAttractDemo) {
int exit = ga_nothing;
do {
int i;
char demo[9];
Expand All @@ -843,14 +844,17 @@ void RunMenu (void)
{
int lump;

if (exit == ga_exitdemo)
break;

D_snprintf(demo, sizeof(demo), "DEMO%1d", i);
lump = W_CheckNumForName(demo);
if (lump == -1)
break;

RunDemo(demo);
exit = RunDemo(demo);
}
} while (true);
} while (exit != ga_exitdemo);
}
M_Stop();
#else
Expand Down

0 comments on commit 6bd793c

Please sign in to comment.