mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 04:01:17 +00:00
make vid_sdl.c use the new window size code and the vid_fullscreen cvar instead
of the -fullscreen command line arg (eww:). Also, doc vid_fullscreen in vid_sgl.c
This commit is contained in:
parent
66bc30c2a8
commit
ac4d76b52a
2 changed files with 5 additions and 4 deletions
|
@ -50,6 +50,7 @@
|
|||
#include "quakedef.h"
|
||||
|
||||
cvar_t *_windowed_mouse;
|
||||
cvar_t *vid_fullscreen;
|
||||
|
||||
int old_windowed_mouse;
|
||||
|
||||
|
@ -152,14 +153,14 @@ VID_Init (unsigned char *palette)
|
|||
//Uint16 video_w, video_h;
|
||||
Uint32 flags;
|
||||
|
||||
vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ROM, "Toggles fullscreen game mode");
|
||||
|
||||
// Load the SDL library
|
||||
if (SDL_Init (SDL_INIT_VIDEO) < 0) //|SDL_INIT_AUDIO|SDL_INIT_CDROM) < 0)
|
||||
Sys_Error("VID: Couldn't load SDL: %s", SDL_GetError());
|
||||
|
||||
// Set up display mode (width and height)
|
||||
vid.width = BASEWIDTH;
|
||||
vid.height = BASEHEIGHT;
|
||||
VID_GetWindowSize (BASEWIDTH, BASEHEIGHT);
|
||||
vid.maxwarpwidth = WARP_WIDTH;
|
||||
vid.maxwarpheight = WARP_HEIGHT;
|
||||
if ((pnum=COM_CheckParm("-winsize"))) {
|
||||
|
@ -173,7 +174,7 @@ VID_Init (unsigned char *palette)
|
|||
|
||||
// Set video width, height and flags
|
||||
flags = (SDL_SWSURFACE|SDL_HWPALETTE);
|
||||
if ( COM_CheckParm ("-fullscreen") )
|
||||
if ( vid_fullscreen->int_val )
|
||||
flags |= SDL_FULLSCREEN;
|
||||
|
||||
// Initialize display
|
||||
|
|
|
@ -334,7 +334,7 @@ VID_Init (unsigned char *palette)
|
|||
|
||||
VID_GetWindowSize (640, 480);
|
||||
|
||||
vid_fullscreen = Cvar_Get ("vid_fullscreen","0",0,"None");
|
||||
vid_fullscreen = Cvar_Get ("vid_fullscreen","0",0,"Toggles fullscreen game mode");
|
||||
|
||||
vid.maxwarpwidth = WARP_WIDTH;
|
||||
vid.maxwarpheight = WARP_HEIGHT;
|
||||
|
|
Loading…
Reference in a new issue