src/events/SDL_mouse.c
branchgsoc2008_manymouse
changeset 3766 24db5d326f57
parent 3765 ed9b7fe8f902
child 3767 abc8acb8e3d7
     1.1 --- a/src/events/SDL_mouse.c	Sat Jul 05 20:02:07 2008 +0000
     1.2 +++ b/src/events/SDL_mouse.c	Sun Jul 06 09:24:56 2008 +0000
     1.3 @@ -52,7 +52,7 @@
     1.4  }
     1.5  
     1.6  int
     1.7 -SDL_AddMouse(const SDL_Mouse * mouse, int index, char* name)
     1.8 +SDL_AddMouse(const SDL_Mouse * mouse, int index, char* name,int pressure_max,int pressure_min)
     1.9  {
    1.10      SDL_Mouse **mice;
    1.11      int selected_mouse;
    1.12 @@ -78,6 +78,8 @@
    1.13      *SDL_mice[index] = *mouse;
    1.14      SDL_mice[index]->name=SDL_malloc(strlen(name)*sizeof(char));
    1.15      strcpy(SDL_mice[index]->name,name);
    1.16 +    SDL_mice[index]->pressure_max=pressure_max;
    1.17 +    SDL_mice[index]->pressure_min=pressure_min;
    1.18      SDL_mice[index]->cursor_shown = SDL_TRUE;
    1.19      selected_mouse = SDL_SelectMouse(index);
    1.20      SDL_mice[index]->cur_cursor = NULL;
    1.21 @@ -368,8 +370,6 @@
    1.22          /* Push the cursor around */
    1.23          xrel = x - last_x;
    1.24          yrel = y - last_y;
    1.25 -        //x = (mouse->x + xrel);
    1.26 -        //y = (mouse->y + yrel);
    1.27      } else {
    1.28          xrel = x - last_x;
    1.29          yrel = y - last_y;
    1.30 @@ -438,6 +438,8 @@
    1.31          event.motion.xrel = xrel;
    1.32          event.motion.yrel = yrel;
    1.33          event.motion.windowID = mouse->focus;
    1.34 +        event.motion.pressure_max=mouse->pressure_max;
    1.35 +        event.motion.pressure_min=mouse->pressure_min;
    1.36          posted = (SDL_PushEvent(&event) > 0);
    1.37      }
    1.38      last_x=x;