Skip to content

Heretic: send pause input when entering menu during demo recording#1330

Open
gera2342 wants to merge 1 commit intofabiangreffrath:masterfrom
gera2342:demo_pause
Open

Heretic: send pause input when entering menu during demo recording#1330
gera2342 wants to merge 1 commit intofabiangreffrath:masterfrom
gera2342:demo_pause

Conversation

@gera2342
Copy link

@gera2342 gera2342 commented Sep 5, 2025

idk if the implementation is correct and fixes all possible ways to desync demos

@fabiangreffrath
Copy link
Owner

idk if the implementation is correct and fixes all possible ways to desync demos

Please try these while recording a demo:

  • pause, unpause
  • enter menu, exit menu
  • pause, enter menu, exit menu (should unpause)
  • enter menu, pause (should have no effect)
  • pause, enter menu, unpause (should have no effect)
  • anything else?

@gera2342
Copy link
Author

gera2342 commented Sep 6, 2025

enter menu, exit menu

this pauses music, it shouldn't

@gera2342
Copy link
Author

gera2342 commented Sep 6, 2025

Also how does doom manage to leave no pauses in the demo? It seems to stop time rather than injecting pause events.

@rfomin
Copy link
Collaborator

rfomin commented Sep 7, 2025

Your implementation seems different. See demostarttic in Crispy Doom or basetic in Woof. Also this:

crispy-doom/src/doom/g_game.c

Lines 1233 to 1245 in c3eaaab

// [crispy] demo pause (from prboom-plus)
if (gameaction == ga_nothing &&
(demoplayback || gamestate == GS_DEMOSCREEN))
{
if (ev->type == ev_keydown && ev->data1 == key_pause)
{
if (paused ^= 2)
S_PauseSound();
else
S_ResumeSound();
return true;
}
}

@fabiangreffrath
Copy link
Owner

We have the two-stage pause from MBF in Crispy Doom. The paused variable can have values 0, 1 or 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants