Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11dga.c @ 1662:782fd950bd46 SDL-1.3
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid.
The code is now run through a consistent indent format:
indent -i4 -nut -nsc -br -ce
The headers are being converted to automatically generate doxygen documentation.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 28 May 2006 13:04:16 +0000 |
parents | d910939febfa |
children | 4da1ee79c9af |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11dga.c Sun May 21 17:27:13 2006 +0000 +++ b/src/video/x11/SDL_x11dga.c Sun May 28 13:04:16 2006 +0000 @@ -33,7 +33,8 @@ /* Global for the error handler */ int dga_event, dga_error = -1; -void X11_EnableDGAMouse(_THIS) +void +X11_EnableDGAMouse (_THIS) { #if SDL_VIDEO_DRIVER_X11_DGAMOUSE int dga_major, dga_minor; @@ -42,19 +43,21 @@ /* Check configuration to see if we should use DGA mouse */ use_dgamouse = 1; - env_use_dgamouse = SDL_getenv("SDL_VIDEO_X11_DGAMOUSE"); - if ( env_use_dgamouse ) { - use_dgamouse = atoi(env_use_dgamouse); + env_use_dgamouse = SDL_getenv ("SDL_VIDEO_X11_DGAMOUSE"); + if (env_use_dgamouse) { + use_dgamouse = atoi (env_use_dgamouse); } /* Check for buggy X servers */ - if ( use_dgamouse && BUGGY_XFREE86(==, 4000) ) { + if (use_dgamouse && BUGGY_XFREE86 ( ==, 4000)) { use_dgamouse = 0; } /* Only use DGA mouse if the cursor is not showing (in relative mode) */ - if ( use_dgamouse && local_X11 && !(using_dga & DGA_MOUSE) && - SDL_NAME(XF86DGAQueryExtension)(SDL_Display, &dga_event, &dga_error) && - SDL_NAME(XF86DGAQueryVersion)(SDL_Display, &dga_major, &dga_minor) ) { - if ( SDL_NAME(XF86DGADirectVideo)(SDL_Display, SDL_Screen, XF86DGADirectMouse) ) { + if (use_dgamouse && local_X11 && !(using_dga & DGA_MOUSE) && + SDL_NAME (XF86DGAQueryExtension) (SDL_Display, &dga_event, &dga_error) + && SDL_NAME (XF86DGAQueryVersion) (SDL_Display, &dga_major, + &dga_minor)) { + if (SDL_NAME (XF86DGADirectVideo) + (SDL_Display, SDL_Screen, XF86DGADirectMouse)) { using_dga |= DGA_MOUSE; } } @@ -62,26 +65,31 @@ } /* Argh. Glide resets DGA mouse mode when it makes the context current! */ -void X11_CheckDGAMouse(_THIS) +void +X11_CheckDGAMouse (_THIS) { #if SDL_VIDEO_DRIVER_X11_DGAMOUSE int flags; - if ( using_dga & DGA_MOUSE ) { - SDL_NAME(XF86DGAQueryDirectVideo)(SDL_Display, SDL_Screen, &flags); - if ( ! (flags & XF86DGADirectMouse) ) { - SDL_NAME(XF86DGADirectVideo)(SDL_Display,SDL_Screen,XF86DGADirectMouse); + if (using_dga & DGA_MOUSE) { + SDL_NAME (XF86DGAQueryDirectVideo) (SDL_Display, SDL_Screen, &flags); + if (!(flags & XF86DGADirectMouse)) { + SDL_NAME (XF86DGADirectVideo) (SDL_Display, SDL_Screen, + XF86DGADirectMouse); } } #endif } -void X11_DisableDGAMouse(_THIS) +void +X11_DisableDGAMouse (_THIS) { #if SDL_VIDEO_DRIVER_X11_DGAMOUSE - if ( using_dga & DGA_MOUSE ) { - SDL_NAME(XF86DGADirectVideo)(SDL_Display, SDL_Screen, 0); + if (using_dga & DGA_MOUSE) { + SDL_NAME (XF86DGADirectVideo) (SDL_Display, SDL_Screen, 0); using_dga &= ~DGA_MOUSE; } #endif /* SDL_VIDEO_DRIVER_X11_DGAMOUSE */ } + +/* vi: set ts=4 sw=4 expandtab: */