void VID_SetMouse(qboolean fullscreengrab, qboolean relative, qboolean hidecursor)
{
if (!mouse_avail || !window)
- fullscreengrab = relative = hidecursor = false;
+ relative = hidecursor = false;
if (relative)
{
if (r_render.integer)
{
CHECKGLERROR
- if (r_speeds.integer || gl_finish.integer)
+ if (r_speeds.integer == 2 || gl_finish.integer)
{
qglFinish();CHECKGLERROR
}
*attrib++ = AGL_NONE;
}
-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)
{
const EventTypeSpec winEvents[] =
{
// Create the window, a bit towards the center of the screen
windowBounds.left = 100;
windowBounds.top = 100;
- windowBounds.right = width + 100;
- windowBounds.bottom = height + 100;
+ windowBounds.right = *width + 100;
+ windowBounds.bottom = *height + 100;
carbonError = CreateNewWindow(kDocumentWindowClass, kWindowStandardFloatingAttributes | kWindowStandardHandlerAttribute, &windowBounds, &window);
if (carbonError != noErr || window == NULL)
{
// TOCHECK: not sure whether or not it's necessary to change the resolution
// "by hand", or if aglSetFullscreen does the job anyway
- refDisplayMode = CGDisplayBestModeForParametersAndRefreshRate(mainDisplay, bpp, width, height, refreshrate, NULL);
+ refDisplayMode = CGDisplayBestModeForParametersAndRefreshRate(mainDisplay, bpp, *width, *height, refreshrate, NULL);
CGDisplaySwitchToMode(mainDisplay, refDisplayMode);
DMGetGDeviceByDisplayID((DisplayIDType)mainDisplay, &gdhDisplay, false);
// Attempt fullscreen if requested
if (fullscreen)
{
- qaglSetFullScreen (context, width, height, refreshrate, 0);
+ qaglSetFullScreen (context, *width, *height, refreshrate, 0);
error = qaglGetError();
if (error != AGL_NO_ERROR)
{
}
}
- scr_width = width;
- scr_height = height;
+ scr_width = *width;
+ scr_height = *height;
if ((qglGetString = (const GLubyte* (GLAPIENTRY *)(GLenum name))GL_GetProcAddress("glGetString")) == NULL)
Sys_Error("glGetString not found in %s", gl_driver);