MCPcopy Create free account
hub / github.com/ZDoom/Raze / updatePauseStatus

Function updatePauseStatus

source/core/gamecontrol.cpp:1207–1240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1205//---------------------------------------------------------------------------
1206
1207void updatePauseStatus()
1208{
1209 // This must go through the network in multiplayer games.
1210 if (M_Active() || System_WantGuiCapture())
1211 {
1212 paused = 1;
1213 }
1214 else if (!AppActive)
1215 {
1216 if (i_pauseinbackground)
1217 paused = 1;
1218 else if (!pausedWithKey)
1219 paused = 0;
1220 }
1221 else if (!M_Active() || !System_WantGuiCapture())
1222 {
1223 if (!pausedWithKey)
1224 {
1225 paused = 0;
1226 }
1227
1228 if (sendPause)
1229 {
1230 sendPause = false;
1231 paused = pausedWithKey ? 0 : 2;
1232 pausedWithKey = !!paused;
1233 }
1234 }
1235
1236 if (paused)
1237 S_PauseSound(!pausedWithKey, !paused);
1238 else
1239 S_ResumeSound(paused);
1240}
1241
1242//==========================================================================
1243//

Callers 1

GameTickerFunction · 0.85

Calls 4

M_ActiveFunction · 0.85
System_WantGuiCaptureFunction · 0.85
S_PauseSoundFunction · 0.85
S_ResumeSoundFunction · 0.85

Tested by

no test coverage detected