X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=vid_sdl.c;h=bb3b22395863cace552b3fa56a228a2841cb95d4;hp=3902899cc15bc0666f0bca3be8a236454d30b075;hb=ecddae3859018ea01887528f3248f03a138be6c3;hpb=42c36cf531913b0b13afab1d0f386c44ae2cc761 diff --git a/vid_sdl.c b/vid_sdl.c index 3902899c..bb3b2239 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -491,9 +491,15 @@ static void VID_SetCaption() icon = LoadIcon( GetModuleHandle( NULL ), MAKEINTRESOURCE( IDI_ICON1 ) ); #ifndef _W64 //If Windows 64bit data types don't exist +#ifndef SetClassLongPtr #define SetClassLongPtr SetClassLong +#endif +#ifndef GCLP_HICON #define GCLP_HICON GCL_HICON +#endif +#ifndef LONG_PTR #define LONG_PTR LONG +#endif #endif SetClassLongPtr( info.window, GCLP_HICON, (LONG_PTR)icon ); } @@ -623,7 +629,7 @@ static void VID_OutputVersion() version->major, version->minor, version->patch ); } -int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate, int stereobuffer) +int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate, int stereobuffer, int samples) { int i; static int notfirstvideomode = false; @@ -699,6 +705,11 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate SDL_GL_SetAttribute (SDL_GL_SWAP_CONTROL, 1); else SDL_GL_SetAttribute (SDL_GL_SWAP_CONTROL, 0); + if (samples > 1) + { + SDL_GL_SetAttribute (SDL_GL_MULTISAMPLEBUFFERS, 1); + SDL_GL_SetAttribute (SDL_GL_MULTISAMPLESAMPLES, samples); + } video_bpp = bpp; video_flags = flags;