Mercurial > sdl-ios-xcode
diff src/video/ataricommon/SDL_ikbdevents.c @ 1668:4da1ee79c9af SDL-1.3
more tweaking indent options
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 29 May 2006 04:04:35 +0000 |
parents | 782fd950bd46 |
children |
line wrap: on
line diff
--- a/src/video/ataricommon/SDL_ikbdevents.c Mon May 29 03:53:21 2006 +0000 +++ b/src/video/ataricommon/SDL_ikbdevents.c Mon May 29 04:04:35 2006 +0000 @@ -71,18 +71,18 @@ static unsigned char *tab_unshift, *tab_shift, *tab_caps; static SDLKey keymap[ATARIBIOS_MAXKEYS]; -static SDL_keysym *TranslateKey (int scancode, int numkeytable, - SDL_keysym * keysym, SDL_bool pressed); +static SDL_keysym *TranslateKey(int scancode, int numkeytable, + SDL_keysym * keysym, SDL_bool pressed); void -AtariIkbd_InitOSKeymap (_THIS) +AtariIkbd_InitOSKeymap(_THIS) { int i; - SDL_memset (SDL_AtariIkbd_keyboard, KEY_UNDEFINED, ATARIBIOS_MAXKEYS); + SDL_memset(SDL_AtariIkbd_keyboard, KEY_UNDEFINED, ATARIBIOS_MAXKEYS); /* Initialize keymap */ - for (i = 0; i < sizeof (keymap); i++) + for (i = 0; i < sizeof(keymap); i++) keymap[i] = SDLK_UNKNOWN; /* Functions keys */ @@ -112,23 +112,23 @@ keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK; /* Read XBIOS tables for scancode -> ascii translation */ - curtables = Keytbl (KT_NOCHANGE, KT_NOCHANGE, KT_NOCHANGE); + curtables = Keytbl(KT_NOCHANGE, KT_NOCHANGE, KT_NOCHANGE); tab_unshift = curtables->unshift; tab_shift = curtables->shift; tab_caps = curtables->caps; /* Set Caps lock initial state */ - caps_state = (Kbshift (-1) & (1 << K_CAPSLOCK)); + caps_state = (Kbshift(-1) & (1 << K_CAPSLOCK)); /* Now install our handler */ SDL_AtariIkbd_mouseb = SDL_AtariIkbd_mousex = SDL_AtariIkbd_mousey = 0; atari_prevmouseb = 0; - Supexec (SDL_AtariIkbdInstall); + Supexec(SDL_AtariIkbdInstall); } static int -atari_GetButton (int button) +atari_GetButton(int button) { switch (button) { case 0: @@ -142,7 +142,7 @@ } void -AtariIkbd_PumpEvents (_THIS) +AtariIkbd_PumpEvents(_THIS) { int i; SDL_keysym keysym; @@ -169,17 +169,17 @@ for (i = 0; i < ATARIBIOS_MAXKEYS; i++) { /* Key pressed ? */ if (SDL_AtariIkbd_keyboard[i] == KEY_PRESSED) { - SDL_PrivateKeyboard (SDL_PRESSED, - TranslateKey (i, specialkeys, &keysym, - SDL_TRUE)); + SDL_PrivateKeyboard(SDL_PRESSED, + TranslateKey(i, specialkeys, &keysym, + SDL_TRUE)); SDL_AtariIkbd_keyboard[i] = KEY_UNDEFINED; } /* Key released ? */ if (SDL_AtariIkbd_keyboard[i] == KEY_RELEASED) { - SDL_PrivateKeyboard (SDL_RELEASED, - TranslateKey (i, specialkeys, &keysym, - SDL_FALSE)); + SDL_PrivateKeyboard(SDL_RELEASED, + TranslateKey(i, specialkeys, &keysym, + SDL_FALSE)); SDL_AtariIkbd_keyboard[i] = KEY_UNDEFINED; } } @@ -188,8 +188,8 @@ /* Mouse motion ? */ if (SDL_AtariIkbd_mousex || SDL_AtariIkbd_mousey) { - SDL_PrivateMouseMotion (0, 1, SDL_AtariIkbd_mousex, - SDL_AtariIkbd_mousey); + SDL_PrivateMouseMotion(0, 1, SDL_AtariIkbd_mousex, + SDL_AtariIkbd_mousey); SDL_AtariIkbd_mousex = SDL_AtariIkbd_mousey = 0; } @@ -202,12 +202,11 @@ prevbutton = atari_prevmouseb & (1 << i); if (curbutton && !prevbutton) { - SDL_PrivateMouseButton (SDL_PRESSED, - atari_GetButton (i), 0, 0); + SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0); } if (!curbutton && prevbutton) { - SDL_PrivateMouseButton (SDL_RELEASED, - atari_GetButton (i), 0, 0); + SDL_PrivateMouseButton(SDL_RELEASED, + atari_GetButton(i), 0, 0); } } atari_prevmouseb = SDL_AtariIkbd_mouseb; @@ -215,8 +214,8 @@ } static SDL_keysym * -TranslateKey (int scancode, int numkeytable, SDL_keysym * keysym, - SDL_bool pressed) +TranslateKey(int scancode, int numkeytable, SDL_keysym * keysym, + SDL_bool pressed) { unsigned char asciicode; @@ -251,9 +250,9 @@ } void -AtariIkbd_ShutdownEvents (void) +AtariIkbd_ShutdownEvents(void) { - Supexec (SDL_AtariIkbdUninstall); + Supexec(SDL_AtariIkbdUninstall); } /* vi: set ts=4 sw=4 expandtab: */