src/video/gem/SDL_gemmouse.c
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
     1.1 --- a/src/video/gem/SDL_gemmouse.c	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/src/video/gem/SDL_gemmouse.c	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -49,23 +49,23 @@
     1.4  
     1.5  
     1.6  void
     1.7 -GEM_FreeWMCursor (_THIS, WMcursor * cursor)
     1.8 +GEM_FreeWMCursor(_THIS, WMcursor * cursor)
     1.9  {
    1.10      if (cursor == NULL)
    1.11          return;
    1.12  
    1.13 -    graf_mouse (ARROW, NULL);
    1.14 +    graf_mouse(ARROW, NULL);
    1.15  
    1.16      if (cursor->mform_p != NULL)
    1.17 -        SDL_free (cursor->mform_p);
    1.18 +        SDL_free(cursor->mform_p);
    1.19  
    1.20 -    SDL_free (cursor);
    1.21 +    SDL_free(cursor);
    1.22  }
    1.23  
    1.24  WMcursor *
    1.25 -GEM_CreateWMCursor (_THIS,
    1.26 -                    Uint8 * data, Uint8 * mask, int w, int h, int hot_x,
    1.27 -                    int hot_y)
    1.28 +GEM_CreateWMCursor(_THIS,
    1.29 +                   Uint8 * data, Uint8 * mask, int w, int h, int hot_x,
    1.30 +                   int hot_y)
    1.31  {
    1.32      WMcursor *cursor;
    1.33      MFORM *new_mform;
    1.34 @@ -73,23 +73,23 @@
    1.35  
    1.36      /* Check the size */
    1.37      if ((w > MAXCURWIDTH) || (h > MAXCURHEIGHT)) {
    1.38 -        SDL_SetError ("Only cursors of dimension (%dx%d) are allowed",
    1.39 -                      MAXCURWIDTH, MAXCURHEIGHT);
    1.40 +        SDL_SetError("Only cursors of dimension (%dx%d) are allowed",
    1.41 +                     MAXCURWIDTH, MAXCURHEIGHT);
    1.42          return (NULL);
    1.43      }
    1.44  
    1.45      /* Allocate the cursor memory */
    1.46 -    cursor = (WMcursor *) SDL_malloc (sizeof (WMcursor));
    1.47 +    cursor = (WMcursor *) SDL_malloc(sizeof(WMcursor));
    1.48      if (cursor == NULL) {
    1.49 -        SDL_OutOfMemory ();
    1.50 +        SDL_OutOfMemory();
    1.51          return (NULL);
    1.52      }
    1.53  
    1.54      /* Allocate mform */
    1.55 -    new_mform = (MFORM *) SDL_malloc (sizeof (MFORM));
    1.56 +    new_mform = (MFORM *) SDL_malloc(sizeof(MFORM));
    1.57      if (new_mform == NULL) {
    1.58 -        SDL_free (cursor);
    1.59 -        SDL_OutOfMemory ();
    1.60 +        SDL_free(cursor);
    1.61 +        SDL_OutOfMemory();
    1.62          return (NULL);
    1.63      }
    1.64  
    1.65 @@ -120,18 +120,18 @@
    1.66  
    1.67  #ifdef DEBUG_VIDEO_GEM
    1.68      for (i = 0; i < h; i++) {
    1.69 -        printf ("sdl:video:gem: cursor, line %d = 0x%04x\n", i,
    1.70 -                new_mform->mf_mask[i]);
    1.71 +        printf("sdl:video:gem: cursor, line %d = 0x%04x\n", i,
    1.72 +               new_mform->mf_mask[i]);
    1.73      }
    1.74  
    1.75 -    printf ("sdl:video:gem: CreateWMCursor(): done\n");
    1.76 +    printf("sdl:video:gem: CreateWMCursor(): done\n");
    1.77  #endif
    1.78  
    1.79      return cursor;
    1.80  }
    1.81  
    1.82  int
    1.83 -GEM_ShowWMCursor (_THIS, WMcursor * cursor)
    1.84 +GEM_ShowWMCursor(_THIS, WMcursor * cursor)
    1.85  {
    1.86  /*
    1.87  	if (cursor == NULL) {
    1.88 @@ -141,7 +141,7 @@
    1.89  	}
    1.90  */
    1.91  #ifdef DEBUG_VIDEO_GEM
    1.92 -    printf ("sdl:video:gem: ShowWMCursor(0x%08x)\n", (long) cursor);
    1.93 +    printf("sdl:video:gem: ShowWMCursor(0x%08x)\n", (long) cursor);
    1.94  #endif
    1.95  
    1.96      return 1;
    1.97 @@ -149,7 +149,7 @@
    1.98  
    1.99  #if 0
   1.100  void
   1.101 -GEM_WarpWMCursor (_THIS, Uint16 x, Uint16 y)
   1.102 +GEM_WarpWMCursor(_THIS, Uint16 x, Uint16 y)
   1.103  {
   1.104      /* This seems to work only on AES 3.4 (Falcon) */
   1.105  
   1.106 @@ -158,17 +158,17 @@
   1.107      warpevent.ap_event = APPEVNT_MOUSE;
   1.108      warpevent.ap_value = (x << 16) | y;
   1.109  
   1.110 -    appl_tplay (&warpevent, 1, 1000);
   1.111 +    appl_tplay(&warpevent, 1, 1000);
   1.112  }
   1.113  #endif
   1.114  
   1.115  void
   1.116 -GEM_CheckMouseMode (_THIS)
   1.117 +GEM_CheckMouseMode(_THIS)
   1.118  {
   1.119      /* If the mouse is hidden and input is grabbed, we use relative mode */
   1.120      if ((!(SDL_cursorstate & CURSOR_VISIBLE)) &&
   1.121          /*(this->input_grab != SDL_GRAB_OFF) && *//* Damn GEM can not grab */
   1.122 -        (SDL_GetAppState () & SDL_APPACTIVE)) {
   1.123 +        (SDL_GetAppState() & SDL_APPACTIVE)) {
   1.124          GEM_mouse_relative = SDL_TRUE;
   1.125      } else {
   1.126          GEM_mouse_relative = SDL_FALSE;