src/video/x11/SDL_x11dga.c
branchSDL-1.3
changeset 1662 782fd950bd46
parent 1402 d910939febfa
child 1668 4da1ee79c9af
     1.1 --- a/src/video/x11/SDL_x11dga.c	Sun May 21 17:27:13 2006 +0000
     1.2 +++ b/src/video/x11/SDL_x11dga.c	Sun May 28 13:04:16 2006 +0000
     1.3 @@ -33,7 +33,8 @@
     1.4  /* Global for the error handler */
     1.5  int dga_event, dga_error = -1;
     1.6  
     1.7 -void X11_EnableDGAMouse(_THIS)
     1.8 +void
     1.9 +X11_EnableDGAMouse (_THIS)
    1.10  {
    1.11  #if SDL_VIDEO_DRIVER_X11_DGAMOUSE
    1.12      int dga_major, dga_minor;
    1.13 @@ -42,19 +43,21 @@
    1.14  
    1.15      /* Check configuration to see if we should use DGA mouse */
    1.16      use_dgamouse = 1;
    1.17 -    env_use_dgamouse = SDL_getenv("SDL_VIDEO_X11_DGAMOUSE");
    1.18 -    if ( env_use_dgamouse ) {
    1.19 -        use_dgamouse = atoi(env_use_dgamouse);
    1.20 +    env_use_dgamouse = SDL_getenv ("SDL_VIDEO_X11_DGAMOUSE");
    1.21 +    if (env_use_dgamouse) {
    1.22 +        use_dgamouse = atoi (env_use_dgamouse);
    1.23      }
    1.24      /* Check for buggy X servers */
    1.25 -    if ( use_dgamouse && BUGGY_XFREE86(==, 4000) ) {
    1.26 +    if (use_dgamouse && BUGGY_XFREE86 ( ==, 4000)) {
    1.27          use_dgamouse = 0;
    1.28      }
    1.29      /* Only use DGA mouse if the cursor is not showing (in relative mode) */
    1.30 -    if ( use_dgamouse && local_X11 && !(using_dga & DGA_MOUSE) &&
    1.31 -         SDL_NAME(XF86DGAQueryExtension)(SDL_Display, &dga_event, &dga_error) &&
    1.32 -         SDL_NAME(XF86DGAQueryVersion)(SDL_Display, &dga_major, &dga_minor) ) {
    1.33 -	if ( SDL_NAME(XF86DGADirectVideo)(SDL_Display, SDL_Screen, XF86DGADirectMouse) ) {
    1.34 +    if (use_dgamouse && local_X11 && !(using_dga & DGA_MOUSE) &&
    1.35 +        SDL_NAME (XF86DGAQueryExtension) (SDL_Display, &dga_event, &dga_error)
    1.36 +        && SDL_NAME (XF86DGAQueryVersion) (SDL_Display, &dga_major,
    1.37 +                                           &dga_minor)) {
    1.38 +        if (SDL_NAME (XF86DGADirectVideo)
    1.39 +            (SDL_Display, SDL_Screen, XF86DGADirectMouse)) {
    1.40              using_dga |= DGA_MOUSE;
    1.41          }
    1.42      }
    1.43 @@ -62,26 +65,31 @@
    1.44  }
    1.45  
    1.46  /* Argh.  Glide resets DGA mouse mode when it makes the context current! */
    1.47 -void X11_CheckDGAMouse(_THIS)
    1.48 +void
    1.49 +X11_CheckDGAMouse (_THIS)
    1.50  {
    1.51  #if SDL_VIDEO_DRIVER_X11_DGAMOUSE
    1.52      int flags;
    1.53  
    1.54 -    if ( using_dga & DGA_MOUSE ) {
    1.55 -        SDL_NAME(XF86DGAQueryDirectVideo)(SDL_Display, SDL_Screen, &flags);
    1.56 -        if ( ! (flags & XF86DGADirectMouse) ) {
    1.57 -                SDL_NAME(XF86DGADirectVideo)(SDL_Display,SDL_Screen,XF86DGADirectMouse);
    1.58 +    if (using_dga & DGA_MOUSE) {
    1.59 +        SDL_NAME (XF86DGAQueryDirectVideo) (SDL_Display, SDL_Screen, &flags);
    1.60 +        if (!(flags & XF86DGADirectMouse)) {
    1.61 +            SDL_NAME (XF86DGADirectVideo) (SDL_Display, SDL_Screen,
    1.62 +                                           XF86DGADirectMouse);
    1.63          }
    1.64      }
    1.65  #endif
    1.66  }
    1.67  
    1.68 -void X11_DisableDGAMouse(_THIS)
    1.69 +void
    1.70 +X11_DisableDGAMouse (_THIS)
    1.71  {
    1.72  #if SDL_VIDEO_DRIVER_X11_DGAMOUSE
    1.73 -    if ( using_dga & DGA_MOUSE ) {
    1.74 -	SDL_NAME(XF86DGADirectVideo)(SDL_Display, SDL_Screen, 0);
    1.75 +    if (using_dga & DGA_MOUSE) {
    1.76 +        SDL_NAME (XF86DGADirectVideo) (SDL_Display, SDL_Screen, 0);
    1.77          using_dga &= ~DGA_MOUSE;
    1.78      }
    1.79  #endif /* SDL_VIDEO_DRIVER_X11_DGAMOUSE */
    1.80  }
    1.81 +
    1.82 +/* vi: set ts=4 sw=4 expandtab: */