Mercurial > sdl-ios-xcode
comparison src/events/SDL_keyboard.c @ 1336:3692456e7b0f
Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 06:59:48 +0000 |
parents | 450721ad5436 |
children | c71e05b4dc2e |
comparison
equal
deleted
inserted
replaced
1335:c39265384763 | 1336:3692456e7b0f |
---|---|
58 /* Set default mode of UNICODE translation */ | 58 /* Set default mode of UNICODE translation */ |
59 SDL_EnableUNICODE(DEFAULT_UNICODE_TRANSLATION); | 59 SDL_EnableUNICODE(DEFAULT_UNICODE_TRANSLATION); |
60 | 60 |
61 /* Initialize the tables */ | 61 /* Initialize the tables */ |
62 SDL_ModState = KMOD_NONE; | 62 SDL_ModState = KMOD_NONE; |
63 memset(keynames, 0, sizeof(keynames)); | 63 SDL_memset(keynames, 0, sizeof(keynames)); |
64 memset(SDL_KeyState, 0, sizeof(SDL_KeyState)); | 64 SDL_memset(SDL_KeyState, 0, sizeof(SDL_KeyState)); |
65 video->InitOSKeymap(this); | 65 video->InitOSKeymap(this); |
66 | 66 |
67 SDL_EnableKeyRepeat(0, 0); | 67 SDL_EnableKeyRepeat(0, 0); |
68 | 68 |
69 /* Fill in the blanks in keynames */ | 69 /* Fill in the blanks in keynames */ |
317 void SDL_ResetKeyboard(void) | 317 void SDL_ResetKeyboard(void) |
318 { | 318 { |
319 SDL_keysym keysym; | 319 SDL_keysym keysym; |
320 SDLKey key; | 320 SDLKey key; |
321 | 321 |
322 memset(&keysym, 0, (sizeof keysym)); | 322 SDL_memset(&keysym, 0, (sizeof keysym)); |
323 for ( key=SDLK_FIRST; key<SDLK_LAST; ++key ) { | 323 for ( key=SDLK_FIRST; key<SDLK_LAST; ++key ) { |
324 if ( SDL_KeyState[key] == SDL_PRESSED ) { | 324 if ( SDL_KeyState[key] == SDL_PRESSED ) { |
325 keysym.sym = key; | 325 keysym.sym = key; |
326 SDL_PrivateKeyboard(SDL_RELEASED, &keysym); | 326 SDL_PrivateKeyboard(SDL_RELEASED, &keysym); |
327 } | 327 } |
374 { | 374 { |
375 SDL_Event event; | 375 SDL_Event event; |
376 int posted, repeatable; | 376 int posted, repeatable; |
377 Uint16 modstate; | 377 Uint16 modstate; |
378 | 378 |
379 memset(&event, 0, sizeof(event)); | 379 SDL_memset(&event, 0, sizeof(event)); |
380 | 380 |
381 #if 0 | 381 #if 0 |
382 printf("The '%s' key has been %s\n", SDL_GetKeyName(keysym->sym), | 382 printf("The '%s' key has been %s\n", SDL_GetKeyName(keysym->sym), |
383 state == SDL_PRESSED ? "pressed" : "released"); | 383 state == SDL_PRESSED ? "pressed" : "released"); |
384 #endif | 384 #endif |