Ticket #1025: 0AD_PauseOnFocusLoss.patch
File 0AD_PauseOnFocusLoss.patch, 2.6 KB (added by , 12 years ago) |
---|
-
binaries/data/config/default.cfg
16 16 ; Enable/disable windowed mode by default. (Use Alt+Enter to toggle in the game.) 17 17 windowed = false 18 18 19 ; Pause the game on window focus loss (Only applicable to single player mode) 20 pauseonfocusloss = false 21 19 22 ; Force a particular resolution. (If these are 0, the default is 20 23 ; to keep the current desktop resolution in fullscreen mode or to 21 24 ; use 1024x768 in windowed mode.) -
source/main.cpp
292 292 // If we are not running a multiplayer game, disable updates when the game is 293 293 // minimized or out of focus and relinquish the CPU a bit, in order to make 294 294 // debugging easier. 295 if( !g_NetClient && !g_app_has_focus )295 if( g_PauseOnFocusLoss && !g_NetClient && !g_app_has_focus ) 296 296 { 297 297 PROFILE3("non-focus delay"); 298 298 need_update = false; -
source/ps/GameSetup/Config.cpp
33 33 bool g_NoGLAutoMipmap = false; 34 34 bool g_NoGLVBO = false; 35 35 36 bool g_PauseOnFocusLoss = false; 37 36 38 bool g_Shadows = false; 37 39 bool g_ShadowPCF = false; 38 40 bool g_FancyWater = false; … … 72 74 CFG_GET_USER_VAL("nos3tc", Bool, g_NoGLS3TC); 73 75 CFG_GET_USER_VAL("noautomipmap", Bool, g_NoGLAutoMipmap); 74 76 CFG_GET_USER_VAL("novbo", Bool, g_NoGLVBO); 77 CFG_GET_USER_VAL("pauseonfocusloss", Bool, g_PauseOnFocusLoss); 75 78 CFG_GET_USER_VAL("shadows", Bool, g_Shadows); 76 79 CFG_GET_USER_VAL("shadowpcf", Bool, g_ShadowPCF); 77 80 CFG_GET_USER_VAL("fancywater", Bool, g_FancyWater); -
source/ps/GameSetup/Config.h
1 /* Copyright (C) 201 0Wildfire Games.1 /* Copyright (C) 2011 Wildfire Games. 2 2 * This file is part of 0 A.D. 3 3 * 4 4 * 0 A.D. is free software: you can redistribute it and/or modify … … 41 41 42 42 //----------------------------------------------------------------------------- 43 43 44 // flag to pause the game on window focus loss 45 extern bool g_PauseOnFocusLoss; 46 44 47 // flag to switch on shadows 45 48 extern bool g_Shadows; 46 49 // flag to switch on reflective/refractive water