git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6320
d7cf8633-e32d-0410-b094-
e92efae38249
// handle the mouse state when windowed if that's changed
vid_usemouse = false;
// handle the mouse state when windowed if that's changed
vid_usemouse = false;
- if (allowmousegrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
+ if (allowmousegrab && vid_mouse.integer && !key_consoleactive && (key_dest != key_game || !cls.demoplayback))
vid_usemouse = true;
if (!vid_activewindow)
vid_usemouse = false;
vid_usemouse = true;
if (!vid_activewindow)
vid_usemouse = false;
qaglDestroyContext(context);
context = NULL;
}
qaglDestroyContext(context);
context = NULL;
}
if (vid_isfullscreen)
CGReleaseAllDisplays();
if (vid_isfullscreen)
CGReleaseAllDisplays();
CGDirectDisplayID mainDisplay;
CFDictionaryRef refDisplayMode;
GDHandle gdhDisplay;
CGDirectDisplayID mainDisplay;
CFDictionaryRef refDisplayMode;
GDHandle gdhDisplay;
// Get the mainDisplay and set resolution to current
mainDisplay = CGMainDisplayID();
CGDisplayCapture(mainDisplay);
// Get the mainDisplay and set resolution to current
mainDisplay = CGMainDisplayID();
CGDisplayCapture(mainDisplay);
// 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);
// 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);
}
// Make the context the current one ('enable' it)
}
// Make the context the current one ('enable' it)
- qaglSetCurrentContext(context);
+ qaglSetCurrentContext(context);
error = qaglGetError();
if (error != AGL_NO_ERROR)
{
error = qaglGetError();
if (error != AGL_NO_ERROR)
{
// handle the mouse state when windowed if that's changed
vid_usemouse = false;
// handle the mouse state when windowed if that's changed
vid_usemouse = false;
- if (allowmousegrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
+ if (allowmousegrab && vid_mouse.integer && !key_consoleactive && (key_dest != key_game || !cls.demoplayback))
vid_usemouse = true;
if (!vid_activewindow)
vid_usemouse = false;
vid_usemouse = true;
if (!vid_activewindow)
vid_usemouse = false;
vid_activewindow = true;
vid_usemouse = false;
vid_activewindow = true;
vid_usemouse = false;
- if( allowmousegrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback )
+ if( allowmousegrab && vid_mouse.integer && !key_consoleactive && (key_dest != key_game || !cls.demoplayback) )
vid_usemouse = true;
if( vid_isfullscreen )
vid_usemouse = true;
vid_usemouse = true;
if( vid_isfullscreen )
vid_usemouse = true;
// handle the mouse state when windowed if that's changed
vid_usemouse = false;
// handle the mouse state when windowed if that's changed
vid_usemouse = false;
- if (allowmousegrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
+ if (allowmousegrab && vid_mouse.integer && !key_consoleactive && (key_dest != key_game || !cls.demoplayback))
vid_usemouse = true;
if (vid_isfullscreen)
vid_usemouse = true;
vid_usemouse = true;
if (vid_isfullscreen)
vid_usemouse = true;