Mercurial > sdl-ios-xcode
diff src/video/android/SDL_androidevents.c @ 4980:d9fdff945ec9
A bit of cleanup in the Android driver
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 12 Jan 2011 13:52:41 -0800 |
parents | 2af0032520d8 |
children | b530ef003506 |
line wrap: on
line diff
--- a/src/video/android/SDL_androidevents.c Wed Jan 12 13:52:27 2011 -0800 +++ b/src/video/android/SDL_androidevents.c Wed Jan 12 13:52:41 2011 -0800 @@ -21,58 +21,12 @@ */ #include "SDL_config.h" -/* Being a null driver, there's no event stream. We just define stubs for - most of the API. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "../../events/SDL_sysevents.h" -#include "../../events/SDL_events_c.h" - #include "SDL_androidevents.h" -void Android_InitEvents() -{ - SDLKey keymap[SDL_NUM_SCANCODES]; - - /* Add default scancode to key mapping */ - SDL_GetDefaultKeymap(keymap); - SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES); -} - void Android_PumpEvents(_THIS) { - - //scanKeys(); - /* TODO: defer click-age */ - /* - if (keysDown() & KEY_TOUCH) { - SDL_SendMouseButton(0, SDL_PRESSED, 0); - } else if (keysUp() & KEY_TOUCH) { - SDL_SendMouseButton(0, SDL_RELEASED, 0); - } - if (keysHeld() & KEY_TOUCH) { - touchPosition t = touchReadXY(); - SDL_SendMouseMotion(0, 0, t.px, t.py, 1); - } - */ -} - - -void Android_OnResize(int width, int height, int format){ - -} - -int -Android_OnKeyDown(int keycode){ - return SDL_SendKeyboardKey(SDL_PRESSED, (SDL_scancode)keycode); -} - -int -Android_OnKeyUp(int keycode){ - return SDL_SendKeyboardKey(SDL_RELEASED, (SDL_scancode)keycode); + /* No polling necessary */ } /* vi: set ts=4 sw=4 expandtab: */