comparison src/events/SDL_mouse.c @ 2725:6ce6d56b63bf

indent
author Sam Lantinga <slouken@libsdl.org>
date Tue, 26 Aug 2008 05:57:41 +0000
parents abacf2555bb4
children 76c2fc9696ea
comparison
equal deleted inserted replaced
2724:0e2b65f32298 2725:6ce6d56b63bf
115 115
116 /* we're setting the mouse properties */ 116 /* we're setting the mouse properties */
117 length = 0; 117 length = 0;
118 length = SDL_strlen(name); 118 length = SDL_strlen(name);
119 SDL_mice[index]->name = SDL_malloc((length + 2) * sizeof(char)); 119 SDL_mice[index]->name = SDL_malloc((length + 2) * sizeof(char));
120 SDL_strlcpy(SDL_mice[index]->name, name, length+1); 120 SDL_strlcpy(SDL_mice[index]->name, name, length + 1);
121 SDL_mice[index]->pressure_max = pressure_max; 121 SDL_mice[index]->pressure_max = pressure_max;
122 SDL_mice[index]->pressure_min = pressure_min; 122 SDL_mice[index]->pressure_min = pressure_min;
123 SDL_mice[index]->cursor_shown = SDL_TRUE; 123 SDL_mice[index]->cursor_shown = SDL_TRUE;
124 selected_mouse = SDL_SelectMouse(index); 124 selected_mouse = SDL_SelectMouse(index);
125 SDL_mice[index]->cur_cursor = NULL; 125 SDL_mice[index]->cur_cursor = NULL;
510 } 510 }
511 type = SDL_MOUSEBUTTONDOWN; 511 type = SDL_MOUSEBUTTONDOWN;
512 mouse->buttonstate |= SDL_BUTTON(button); 512 mouse->buttonstate |= SDL_BUTTON(button);
513 break; 513 break;
514 case SDL_RELEASED: 514 case SDL_RELEASED:
515 if(!(mouse->buttonstate & SDL_BUTTON(button))) { 515 if (!(mouse->buttonstate & SDL_BUTTON(button))) {
516 /* Ignore this event, no state change */ 516 /* Ignore this event, no state change */
517 return 0; 517 return 0;
518 } 518 }
519 type = SDL_MOUSEBUTTONUP; 519 type = SDL_MOUSEBUTTONUP;
520 mouse->buttonstate &= ~SDL_BUTTON(button); 520 mouse->buttonstate &= ~SDL_BUTTON(button);