Mercurial > sdl-ios-xcode
comparison test/testime.c @ 4465:3e69e077cb95
Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.
Plus, this lets me start implementing cursor support.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 09 May 2010 20:47:22 -0700 |
parents | 15eea7a1fa97 |
children | 8c229370ddba b99b1024607a |
comparison
equal
deleted
inserted
replaced
4464:fa77a6429698 | 4465:3e69e077cb95 |
---|---|
277 { | 277 { |
278 break; | 278 break; |
279 } | 279 } |
280 | 280 |
281 fprintf(stderr, | 281 fprintf(stderr, |
282 "Keyboard %d: scancode 0x%08X = %s, keycode 0x%08X = %s\n", | 282 "Keyboard: scancode 0x%08X = %s, keycode 0x%08X = %s\n", |
283 event.key.which, event.key.keysym.scancode, | 283 event.key.keysym.scancode, |
284 SDL_GetScancodeName(event.key.keysym.scancode), | 284 SDL_GetScancodeName(event.key.keysym.scancode), |
285 event.key.keysym.sym, SDL_GetKeyName(event.key.keysym.sym)); | 285 event.key.keysym.sym, SDL_GetKeyName(event.key.keysym.sym)); |
286 break; | 286 break; |
287 | 287 |
288 case SDL_TEXTINPUT: | 288 case SDL_TEXTINPUT: |
289 if (SDL_strlen(event.text.text) == 0 || event.text.text[0] == '\n' || | 289 if (SDL_strlen(event.text.text) == 0 || event.text.text[0] == '\n' || |
290 markedRect.w < 0) | 290 markedRect.w < 0) |
291 break; | 291 break; |
292 | 292 |
293 fprintf(stderr, "Keyboard %d: text input \"%s\"\n", | 293 fprintf(stderr, "Keyboard: text input \"%s\"\n", event.text.text); |
294 event.text.which, event.text.text); | |
295 | 294 |
296 if (SDL_strlen(text) + SDL_strlen(event.text.text) < sizeof(text)) | 295 if (SDL_strlen(text) + SDL_strlen(event.text.text) < sizeof(text)) |
297 strcpy(text + SDL_strlen(text), event.text.text); | 296 strcpy(text + SDL_strlen(text), event.text.text); |
298 | 297 |
299 fprintf(stderr, "text inputed: %s\n", text); | 298 fprintf(stderr, "text inputed: %s\n", text); |