| 1205 | //--------------------------------------------------------------------------- |
| 1206 | |
| 1207 | void 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 | // |
no test coverage detected