if (r_render.integer && !vid_hidden)
{
CHECKGLERROR
- if (r_speeds.integer || gl_finish.integer)
+ if (r_speeds.integer == 2 || gl_finish.integer)
{
qglFinish();CHECKGLERROR
}
{
LONG lRet = 1;
int fActive, fMinimized, temp;
- char state[256];
- char asciichar[4];
+ unsigned char state[256];
+ unsigned char asciichar[4];
int vkey;
int charlength;
qboolean down = false;
IN_Init();
}
-int VID_InitMode (int fullscreen, int width, int height, int bpp, int refreshrate, int stereobuffer, int samples)
+int VID_InitMode (int fullscreen, int *width, int *height, int bpp, int refreshrate, int stereobuffer, int samples)
{
int i;
HDC hdc;
};
int windowpass;
int pixelformat, newpixelformat;
- int numpixelformats;
+ UINT numpixelformats;
DWORD WindowStyle, ExWindowStyle;
int CenterX, CenterY;
const char *gldrivername;
foundmode = true;
gdevmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
gdevmode.dmBitsPerPel = bpp;
- gdevmode.dmPelsWidth = width;
- gdevmode.dmPelsHeight = height;
+ gdevmode.dmPelsWidth = *width;
+ gdevmode.dmPelsHeight = *height;
gdevmode.dmSize = sizeof (gdevmode);
if(refreshrate)
{
Con_Printf("wrong bpp\n");
continue;
}
- if(thismode.dmPelsWidth != (DWORD)width)
+ if(thismode.dmPelsWidth != (DWORD)*width)
{
if(developer.integer >= 100)
Con_Printf("wrong width\n");
continue;
}
- if(thismode.dmPelsHeight != (DWORD)height)
+ if(thismode.dmPelsHeight != (DWORD)*height)
{
if(developer.integer >= 100)
Con_Printf("wrong height\n");
if (!foundmode)
{
VID_Shutdown();
- Con_Printf("Unable to find the requested mode %dx%dx%dbpp\n", width, height, bpp);
+ Con_Printf("Unable to find the requested mode %dx%dx%dbpp\n", *width, *height, bpp);
return false;
}
else if(ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL)
{
VID_Shutdown();
- Con_Printf("Unable to change to requested mode %dx%dx%dbpp\n", width, height, bpp);
+ Con_Printf("Unable to change to requested mode %dx%dx%dbpp\n", *width, *height, bpp);
return false;
}
rect.top = 0;
rect.left = 0;
- rect.right = width;
- rect.bottom = height;
+ rect.right = *width;
+ rect.bottom = *height;
AdjustWindowRectEx(&rect, WindowStyle, false, 0);
if (fullscreen)