comparison src/video/dc/SDL_dcevents.c @ 2735:204be4fc2726

Final merge of Google Summer of Code 2008 work... Port SDL 1.3 to the Nintendo DS by Darren Alton, mentored by Sam Lantinga
author Sam Lantinga <slouken@libsdl.org>
date Wed, 27 Aug 2008 15:10:03 +0000
parents c121d94672cb
children 99210400e8b9
comparison
equal deleted inserted replaced
2734:dd25eabe441c 2735:204be4fc2726
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