93 if (modeInfo->
width <= 0 || modeInfo->
height <= 0) {
94 Com_Printf(
"I: using the desktop resolution because vid_mode, vid_height and vid_width are set to -1 (%ix%i)\n",
105 width = vid_modes[modeIndex].
width;
106 height = vid_modes[modeIndex].
height;
108 modeInfo->
width = width;
109 modeInfo->
height = height;
149 #if SDL_VERSION_ATLEAST(2,0,0)
150 SDL_MinimizeWindow(
cls.window);
152 SDL_WM_IconifyWindow();
165 vid_grabmouse =
Cvar_Get(
"vid_grabmouse",
"0",
CVAR_ARCHIVE,
"Grab the mouse in the game window - open the console to switch back to your desktop via Alt+Tab");
167 vid_ignoregamma =
Cvar_Get(
"vid_ignoregamma",
"0",
CVAR_ARCHIVE,
"Don't control the gamma settings if set to 1");
169 vid_height =
Cvar_Get(
"vid_height",
"-1",
CVAR_ARCHIVE,
"Custom video height - set vid_mode to -1 to use this");
170 vid_width =
Cvar_Get(
"vid_width",
"-1",
CVAR_ARCHIVE,
"Custom video width - set vid_mode to -1 to use this");
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
static cvar_t * vid_height
memPool_t * vid_modelPool
void CL_ViewPrecacheModels(void)
Precaches all models at game startup - for faster access.
bool Cvar_AssertValue(cvar_t *cvar, float minVal, float maxVal, bool shouldBeIntegral)
Checks cvar values.
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
void GAME_ReloadMode(void)
Shared game type headers.
memPool_t * vid_genericPool
void Com_Printf(const char *const fmt,...)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
r_sdl_config_t r_sdl_config
static void VID_Restart_f(void)
Perform a renderer restart.
#define Mem_CreatePool(name)
memPool_t * vid_lightPool
Contains the game screen size and drawing scale.
bool VID_GetModeInfo(int modeIndex, vidmode_t *modeInfo)
memPool_t * vid_imagePool
int VID_GetModeNums(void)
Returns the amount of available video modes.
static const vidmode_t vid_modes[]
All possible video modes.
Primary header for client.
static cvar_t * vid_width
bool Cvar_SetCheckFunction(const char *varName, bool(*check)(cvar_t *cvar))
Set a checker function for cvar values.
static bool CL_CvarCheckVidMode(cvar_t *cvar)
static bool CL_CvarCheckVidGamma(cvar_t *cvar)