X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=vid_sdl.c;h=c87dbe7454a845502ef786a1ed9db24aa417a531;hp=6f59ad305cadc81915fb604ba7f2b8db0431f09f;hb=cb872df2ca589d4b30c733dc239986dfd64f0c12;hpb=137011aed4d11feb6a7e74797d2051f058a835a1 diff --git a/vid_sdl.c b/vid_sdl.c index 6f59ad30..c87dbe74 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#undef WIN32_LEAN_AND_MEAN //hush a warning, SDL.h redefines this #include #include @@ -346,11 +347,10 @@ static void VID_SetCaption() return; icon = LoadIcon( GetModuleHandle( NULL ), MAKEINTRESOURCE( IDI_ICON1 ) ); -#ifndef SetClassLongPtr +#ifndef _W64 //If Windows 64bit data types don't exist #define SetClassLongPtr SetClassLong -#endif -#ifndef GCLP_HICON #define GCLP_HICON GCL_HICON +#define LONG_PTR LONG #endif SetClassLongPtr( info.window, GCLP_HICON, (LONG_PTR)icon ); } @@ -483,7 +483,7 @@ int VID_GetGamma (unsigned short *ramps) return !SDL_GetGammaRamp( ramps, ramps + 256, ramps + 512); } -void VID_Finish (void) +void VID_Finish (qboolean allowmousegrab) { Uint8 appstate; qboolean vid_usemouse; @@ -503,7 +503,7 @@ void VID_Finish (void) vid_activewindow = true; vid_usemouse = false; - if( vid_mouse.integer && !key_consoleactive && !cls.demoplayback ) + if( allowmousegrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback ) vid_usemouse = true; if( vid_isfullscreen ) vid_usemouse = true;