| 309 | } |
| 310 | |
| 311 | static void HandleInactiveChanged(void* obj) { |
| 312 | if (Window_Main.Inactive) { |
| 313 | Chat_AddOf(&Gfx_LowPerfMessage, MSG_TYPE_EXTRASTATUS_2); |
| 314 | Gfx_SetVSync(false); |
| 315 | Game_SetMinFrameTime(1000 / 1.0f); |
| 316 | Gfx.ReducedPerfMode = true; |
| 317 | } else { |
| 318 | Chat_AddOf(&String_Empty, MSG_TYPE_EXTRASTATUS_2); |
| 319 | Game_SetFpsLimit(Game_FpsLimit); |
| 320 | |
| 321 | Gfx.ReducedPerfMode = false; |
| 322 | Gfx.ReducedPerfModeCooldown = 2; |
| 323 | } |
| 324 | |
| 325 | #ifdef CC_BUILD_WEB |
| 326 | extern void emscripten_resume_main_loop(void); |
| 327 | emscripten_resume_main_loop(); |
| 328 | #endif |
| 329 | } |
| 330 | |
| 331 | static void Game_WarnFunc(const cc_string* msg) { |
| 332 | cc_string str = *msg, line; |
nothing calls this directly
no test coverage detected