comparison src/video/dc/SDL_dcevents.c @ 2698:e1da92da346c gsoc2008_nds

Clean up.
author Darren Alton <dalton@stevens.edu>
date Wed, 27 Aug 2008 04:23:38 +0000
parents c121d94672cb
children 99210400e8b9
comparison
equal deleted inserted replaced
2697:c9121b04cffa 2698:e1da92da346c
133 133
134 shiftkeys = state->shift_keys ^ old_state.shift_keys; 134 shiftkeys = state->shift_keys ^ old_state.shift_keys;
135 for (i = 0; i < sizeof(sdl_shift); i++) { 135 for (i = 0; i < sizeof(sdl_shift); i++) {
136 if ((shiftkeys >> i) & 1) { 136 if ((shiftkeys >> i) & 1) {
137 keysym.sym = sdl_shift[i]; 137 keysym.sym = sdl_shift[i];
138 SDL_PrivateKeyboard(((state-> 138 SDL_PrivateKeyboard(((state->shift_keys >> i) & 1) ? SDL_PRESSED :
139 shift_keys >> i) & 1) ? SDL_PRESSED :
140 SDL_RELEASED, &keysym); 139 SDL_RELEASED, &keysym);
141 } 140 }
142 } 141 }
143 142
144 for (i = 0; i < sizeof(sdl_key); i++) { 143 for (i = 0; i < sizeof(sdl_key); i++) {
145 if (state->matrix[i] != old_state.matrix[i]) { 144 if (state->matrix[i] != old_state.matrix[i]) {
146 int key = sdl_key[i]; 145 int key = sdl_key[i];
147 if (key) { 146 if (key) {
148 keysym.sym = key; 147 keysym.sym = key;
149 SDL_PrivateKeyboard(state-> 148 SDL_PrivateKeyboard(state->matrix[i] ? SDL_PRESSED :
150 matrix[i] ? SDL_PRESSED :
151 SDL_RELEASED, &keysym); 149 SDL_RELEASED, &keysym);
152 } 150 }
153 } 151 }
154 } 152 }
155 153