indent
authorSam Lantinga <slouken@libsdl.org>
Thu, 01 Jan 2009 08:21:19 +0000
changeset 29421e431c2631ee
parent 2941 1d2bc7259f30
child 2943 6429dfe45d82
indent
src/audio/SDL_audio.c
src/audio/alsa/SDL_alsa_audio.c
src/audio/esd/SDL_esdaudio.c
src/audio/iphoneos/SDL_coreaudio_iphone.c
src/audio/mint/SDL_mintaudio_dma8.c
src/audio/mint/SDL_mintaudio_gsxb.c
src/audio/mint/SDL_mintaudio_mcsn.c
src/audio/mint/SDL_mintaudio_stfa.c
src/audio/mint/SDL_mintaudio_xbios.c
src/audio/nas/SDL_nasaudio.c
src/audio/nds/SDL_ndsaudio.c
src/audio/nto/SDL_nto_audio.c
src/audio/paudio/SDL_paudio.c
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11mouse.c
src/video/x11/SDL_x11window.c
     1.1 --- a/src/audio/SDL_audio.c	Thu Jan 01 08:19:56 2009 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Thu Jan 01 08:21:19 2009 +0000
     1.3 @@ -617,10 +617,10 @@
     1.4          current_audio.name = backend->name;
     1.5          current_audio.desc = backend->desc;
     1.6          rc = backend->init(&current_audio.impl);
     1.7 -        if (rc == 2) {  /* init'd, and devices available. Take it! */
     1.8 +        if (rc == 2) {          /* init'd, and devices available. Take it! */
     1.9              initialized = 1;
    1.10              best_choice = i;
    1.11 -        } else if (rc == 1) { /* init'd, but can't see any devices. */
    1.12 +        } else if (rc == 1) {   /* init'd, but can't see any devices. */
    1.13              current_audio.impl.Deinitialize();
    1.14              if (best_choice == -1) {
    1.15                  best_choice = i;
     2.1 --- a/src/audio/alsa/SDL_alsa_audio.c	Thu Jan 01 08:19:56 2009 +0000
     2.2 +++ b/src/audio/alsa/SDL_alsa_audio.c	Thu Jan 01 08:21:19 2009 +0000
     2.3 @@ -607,7 +607,7 @@
     2.4      impl->Deinitialize = ALSA_Deinitialize;
     2.5      impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: Add device enum! */
     2.6  
     2.7 -    return 1;  /* !!! FIXME: return 2 once device enum is implemented. */
     2.8 +    return 1;                   /* !!! FIXME: return 2 once device enum is implemented. */
     2.9  }
    2.10  
    2.11  
     3.1 --- a/src/audio/esd/SDL_esdaudio.c	Thu Jan 01 08:19:56 2009 +0000
     3.2 +++ b/src/audio/esd/SDL_esdaudio.c	Thu Jan 01 08:21:19 2009 +0000
     3.3 @@ -341,7 +341,7 @@
     3.4      impl->Deinitialize = ESD_Deinitialize;
     3.5      impl->OnlyHasDefaultOutputDevice = 1;
     3.6  
     3.7 -    return 2;  /* return 2 (definitely have a "device"). */
     3.8 +    return 2;                   /* return 2 (definitely have a "device"). */
     3.9  }
    3.10  
    3.11  
     4.1 --- a/src/audio/iphoneos/SDL_coreaudio_iphone.c	Thu Jan 01 08:19:56 2009 +0000
     4.2 +++ b/src/audio/iphoneos/SDL_coreaudio_iphone.c	Thu Jan 01 08:21:19 2009 +0000
     4.3 @@ -329,7 +329,7 @@
     4.4      impl->OnlyHasDefaultOutputDevice = 1;
     4.5      impl->HasCaptureSupport = 0;        /* still needs to be written */
     4.6  
     4.7 -    return 2;  /* defitely have an audio device. */
     4.8 +    return 2;                   /* defitely have an audio device. */
     4.9  }
    4.10  
    4.11  AudioBootStrap COREAUDIOIPHONE_bootstrap = {
     5.1 --- a/src/audio/mint/SDL_mintaudio_dma8.c	Thu Jan 01 08:19:56 2009 +0000
     5.2 +++ b/src/audio/mint/SDL_mintaudio_dma8.c	Thu Jan 01 08:21:19 2009 +0000
     5.3 @@ -338,7 +338,7 @@
     5.4      impl->ProvidesOwnCallbackThread = 1;
     5.5      impl->SkipMixerLock = 1;
     5.6  
     5.7 -    return 2;  /* 2 == definitely has an audio device. */
     5.8 +    return 2;                   /* 2 == definitely has an audio device. */
     5.9  }
    5.10  
    5.11  AudioBootStrap MINTAUDIO_DMA8_bootstrap = {
     6.1 --- a/src/audio/mint/SDL_mintaudio_gsxb.c	Thu Jan 01 08:19:56 2009 +0000
     6.2 +++ b/src/audio/mint/SDL_mintaudio_gsxb.c	Thu Jan 01 08:21:19 2009 +0000
     6.3 @@ -433,7 +433,7 @@
     6.4      impl->ProvidesOwnCallbackThread = 1;
     6.5      impl->SkipMixerLock = 1;
     6.6  
     6.7 -    return 2;  /* 2 == definitely has an audio device. */
     6.8 +    return 2;                   /* 2 == definitely has an audio device. */
     6.9  }
    6.10  
    6.11  AudioBootStrap MINTAUDIO_GSXB_bootstrap = {
     7.1 --- a/src/audio/mint/SDL_mintaudio_mcsn.c	Thu Jan 01 08:19:56 2009 +0000
     7.2 +++ b/src/audio/mint/SDL_mintaudio_mcsn.c	Thu Jan 01 08:21:19 2009 +0000
     7.3 @@ -390,7 +390,7 @@
     7.4      impl->ProvidesOwnCallbackThread = 1;
     7.5      impl->SkipMixerLock = 1;
     7.6  
     7.7 -    return 2;  /* 2 == definitely has an audio device. */
     7.8 +    return 2;                   /* 2 == definitely has an audio device. */
     7.9  }
    7.10  
    7.11  AudioBootStrap MINTAUDIO_MCSN_bootstrap = {
     8.1 --- a/src/audio/mint/SDL_mintaudio_stfa.c	Thu Jan 01 08:19:56 2009 +0000
     8.2 +++ b/src/audio/mint/SDL_mintaudio_stfa.c	Thu Jan 01 08:21:19 2009 +0000
     8.3 @@ -297,7 +297,7 @@
     8.4      impl->ProvidesOwnCallbackThread = 1;
     8.5      impl->SkipMixerLock = 1;
     8.6  
     8.7 -    return 2;  /* 2 == definitely has an audio device. */
     8.8 +    return 2;                   /* 2 == definitely has an audio device. */
     8.9  }
    8.10  
    8.11  AudioBootStrap MINTAUDIO_STFA_bootstrap = {
     9.1 --- a/src/audio/mint/SDL_mintaudio_xbios.c	Thu Jan 01 08:19:56 2009 +0000
     9.2 +++ b/src/audio/mint/SDL_mintaudio_xbios.c	Thu Jan 01 08:21:19 2009 +0000
     9.3 @@ -490,7 +490,7 @@
     9.4      impl->ProvidesOwnCallbackThread = 1;
     9.5      impl->SkipMixerLock = 1;
     9.6  
     9.7 -    return 2;  /* 2 == definitely has an audio device. */
     9.8 +    return 2;                   /* 2 == definitely has an audio device. */
     9.9  }
    9.10  
    9.11  AudioBootStrap MINTAUDIO_XBIOS_bootstrap = {
    10.1 --- a/src/audio/nas/SDL_nasaudio.c	Thu Jan 01 08:19:56 2009 +0000
    10.2 +++ b/src/audio/nas/SDL_nasaudio.c	Thu Jan 01 08:21:19 2009 +0000
    10.3 @@ -398,7 +398,7 @@
    10.4      impl->Deinitialize = NAS_Deinitialize;
    10.5      impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: is this true? */
    10.6  
    10.7 -    return 2;  /* 2 == definitely has an audio device. */
    10.8 +    return 2;                   /* 2 == definitely has an audio device. */
    10.9  }
   10.10  
   10.11  AudioBootStrap NAS_bootstrap = {
    11.1 --- a/src/audio/nds/SDL_ndsaudio.c	Thu Jan 01 08:19:56 2009 +0000
    11.2 +++ b/src/audio/nds/SDL_ndsaudio.c	Thu Jan 01 08:21:19 2009 +0000
    11.3 @@ -120,7 +120,7 @@
    11.4      impl->OnlyHasDefaultOutputDevice = 1;
    11.5      impl->OnlyHasDefaultInputDevice = 1;
    11.6  
    11.7 -    return 2;  /* 2 == definitely has an audio device. */
    11.8 +    return 2;                   /* 2 == definitely has an audio device. */
    11.9  }
   11.10  
   11.11  AudioBootStrap NDSAUD_bootstrap = {
    12.1 --- a/src/audio/nto/SDL_nto_audio.c	Thu Jan 01 08:19:56 2009 +0000
    12.2 +++ b/src/audio/nto/SDL_nto_audio.c	Thu Jan 01 08:21:19 2009 +0000
    12.3 @@ -457,7 +457,7 @@
    12.4      impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: add device enum! */
    12.5  
    12.6      /* !!! FIXME: device enum might make this 1. */
    12.7 -    return 2;  /* 2 == definitely has an audio device. */
    12.8 +    return 2;                   /* 2 == definitely has an audio device. */
    12.9  }
   12.10  
   12.11  AudioBootStrap QNXNTOAUDIO_bootstrap = {
    13.1 --- a/src/audio/paudio/SDL_paudio.c	Thu Jan 01 08:19:56 2009 +0000
    13.2 +++ b/src/audio/paudio/SDL_paudio.c	Thu Jan 01 08:21:19 2009 +0000
    13.3 @@ -545,7 +545,7 @@
    13.4      impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: add device enum! */
    13.5  
    13.6      /* !!! FIXME: device enum might make this 1. */
    13.7 -    return 2;  /* 2 == definitely has an audio device. */
    13.8 +    return 2;                   /* 2 == definitely has an audio device. */
    13.9  }
   13.10  
   13.11  AudioBootStrap PAUDIO_bootstrap = {
    14.1 --- a/src/video/x11/SDL_x11events.c	Thu Jan 01 08:19:56 2009 +0000
    14.2 +++ b/src/video/x11/SDL_x11events.c	Thu Jan 01 08:21:19 2009 +0000
    14.3 @@ -297,49 +297,55 @@
    14.4  
    14.5      default:{
    14.6  #if SDL_VIDEO_DRIVER_X11_XINPUT
    14.7 -        for (i = 0; i < SDL_GetNumMice(); ++i) {
    14.8 -            SDL_Mouse *mouse;
    14.9 -            X11_MouseData *data;
   14.10 +            for (i = 0; i < SDL_GetNumMice(); ++i) {
   14.11 +                SDL_Mouse *mouse;
   14.12 +                X11_MouseData *data;
   14.13  
   14.14 -            mouse = SDL_GetMouse(i);
   14.15 -            data = (X11_MouseData *)mouse->driverdata;
   14.16 -            if (!data) {
   14.17 -                continue;
   14.18 +                mouse = SDL_GetMouse(i);
   14.19 +                data = (X11_MouseData *) mouse->driverdata;
   14.20 +                if (!data) {
   14.21 +                    continue;
   14.22 +                }
   14.23 +
   14.24 +                if (xevent.type == data->motion) {      /* MotionNotify */
   14.25 +                    XDeviceMotionEvent *move =
   14.26 +                        (XDeviceMotionEvent *) & xevent;
   14.27 +#ifdef DEBUG_MOTION
   14.28 +                    printf("X11 motion: %d,%d\n", move->x, move->y);
   14.29 +#endif
   14.30 +                    SDL_SendMouseMotion(move->deviceid, 0, move->x, move->y,
   14.31 +                                        move->axis_data[2]);
   14.32 +                    return;
   14.33 +                }
   14.34 +                if (xevent.type == data->button_pressed) {      /* ButtonPress */
   14.35 +                    XDeviceButtonPressedEvent *pressed =
   14.36 +                        (XDeviceButtonPressedEvent *) & xevent;
   14.37 +                    SDL_SendMouseButton(pressed->deviceid, SDL_PRESSED,
   14.38 +                                        pressed->button);
   14.39 +                    return;
   14.40 +                }
   14.41 +                if (xevent.type == data->button_released) {     /* ButtonRelease */
   14.42 +                    XDeviceButtonReleasedEvent *released =
   14.43 +                        (XDeviceButtonReleasedEvent *) & xevent;
   14.44 +                    SDL_SendMouseButton(released->deviceid, SDL_RELEASED,
   14.45 +                                        released->button);
   14.46 +                    return;
   14.47 +                }
   14.48 +                if (xevent.type == data->proximity_in) {
   14.49 +                    XProximityNotifyEvent *proximity =
   14.50 +                        (XProximityNotifyEvent *) & xevent;
   14.51 +                    SDL_SendProximity(proximity->deviceid, proximity->x,
   14.52 +                                      proximity->y, SDL_PROXIMITYIN);
   14.53 +                    return;
   14.54 +                }
   14.55 +                if (xevent.type == data->proximity_out) {
   14.56 +                    XProximityNotifyEvent *proximity =
   14.57 +                        (XProximityNotifyEvent *) & xevent;
   14.58 +                    SDL_SendProximity(proximity->deviceid, proximity->x,
   14.59 +                                      proximity->y, SDL_PROXIMITYOUT);
   14.60 +                    return;
   14.61 +                }
   14.62              }
   14.63 -                    
   14.64 -            if (xevent.type == data->motion) {          /* MotionNotify */
   14.65 -                XDeviceMotionEvent *move = (XDeviceMotionEvent *) & xevent;
   14.66 -#ifdef DEBUG_MOTION
   14.67 -                printf("X11 motion: %d,%d\n", move->x, move->y);
   14.68 -#endif
   14.69 -                SDL_SendMouseMotion(move->deviceid, 0, move->x, move->y, move->axis_data[2]);
   14.70 -                return;
   14.71 -            }
   14.72 -            if (xevent.type == data->button_pressed) {  /* ButtonPress */
   14.73 -                XDeviceButtonPressedEvent *pressed =
   14.74 -                    (XDeviceButtonPressedEvent *) & xevent;
   14.75 -                SDL_SendMouseButton(pressed->deviceid, SDL_PRESSED, pressed->button);
   14.76 -                return;
   14.77 -            }
   14.78 -            if (xevent.type == data->button_released) { /* ButtonRelease */
   14.79 -                XDeviceButtonReleasedEvent *released =
   14.80 -                    (XDeviceButtonReleasedEvent *) & xevent;
   14.81 -                SDL_SendMouseButton(released->deviceid, SDL_RELEASED, released->button);
   14.82 -                return;
   14.83 -            }
   14.84 -            if (xevent.type == data->proximity_in) {
   14.85 -                XProximityNotifyEvent *proximity =
   14.86 -                    (XProximityNotifyEvent *) & xevent;
   14.87 -                SDL_SendProximity(proximity->deviceid, proximity->x, proximity->y, SDL_PROXIMITYIN);
   14.88 -                return;
   14.89 -            }
   14.90 -            if (xevent.type == data->proximity_out) {
   14.91 -                XProximityNotifyEvent *proximity =
   14.92 -                    (XProximityNotifyEvent *) & xevent;
   14.93 -                SDL_SendProximity(proximity->deviceid, proximity->x, proximity->y, SDL_PROXIMITYOUT);
   14.94 -                return;
   14.95 -            }
   14.96 -        }
   14.97  #endif
   14.98  #ifdef DEBUG_XEVENTS
   14.99              printf("Unhandled event %d\n", xevent.type);
    15.1 --- a/src/video/x11/SDL_x11mouse.c	Thu Jan 01 08:19:56 2009 +0000
    15.2 +++ b/src/video/x11/SDL_x11mouse.c	Thu Jan 01 08:21:19 2009 +0000
    15.3 @@ -26,9 +26,9 @@
    15.4  
    15.5  #if SDL_VIDEO_DRIVER_X11_XINPUT
    15.6  static void
    15.7 -X11_FreeMouse(SDL_Mouse *mouse)
    15.8 +X11_FreeMouse(SDL_Mouse * mouse)
    15.9  {
   15.10 -    X11_MouseData *data = (X11_MouseData *)mouse->driverdata;
   15.11 +    X11_MouseData *data = (X11_MouseData *) mouse->driverdata;
   15.12  
   15.13      if (data) {
   15.14          XCloseDevice(data->display, mouse->id);
   15.15 @@ -73,7 +73,7 @@
   15.16                  if (deviceClass->class == ValuatorClass) {      /* bingo ;) */
   15.17                      XValuatorInfo *valInfo;
   15.18  
   15.19 -                    data = (X11_MouseData *)SDL_calloc(1, sizeof(*data));
   15.20 +                    data = (X11_MouseData *) SDL_calloc(1, sizeof(*data));
   15.21                      if (!data) {
   15.22                          continue;
   15.23                      }
   15.24 @@ -120,11 +120,11 @@
   15.25                      valInfo = (XValuatorInfo *) deviceClass;
   15.26                      /* if the device reports pressure, lets check it parameteres */
   15.27                      if (valInfo->num_axes > 2) {
   15.28 -                            SDL_AddMouse(&mouse, DevList[i].name,
   15.29 -                                         valInfo->axes[2].max_value,
   15.30 -                                         valInfo->axes[2].min_value, 1);
   15.31 +                        SDL_AddMouse(&mouse, DevList[i].name,
   15.32 +                                     valInfo->axes[2].max_value,
   15.33 +                                     valInfo->axes[2].min_value, 1);
   15.34                      } else {
   15.35 -                            SDL_AddMouse(&mouse, DevList[i].name, 0, 0, 1);
   15.36 +                        SDL_AddMouse(&mouse, DevList[i].name, 0, 0, 1);
   15.37                      }
   15.38                      break;
   15.39                  }
    16.1 --- a/src/video/x11/SDL_x11window.c	Thu Jan 01 08:19:56 2009 +0000
    16.2 +++ b/src/video/x11/SDL_x11window.c	Thu Jan 01 08:21:19 2009 +0000
    16.3 @@ -534,7 +534,7 @@
    16.4              X11_MouseData *data;
    16.5  
    16.6              mouse = SDL_GetMouse(i);
    16.7 -            data = (X11_MouseData *)mouse->driverdata;
    16.8 +            data = (X11_MouseData *) mouse->driverdata;
    16.9              if (!data) {
   16.10                  continue;
   16.11              }