Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed compiling on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 1, 2011
1 parent f484449 commit f103186
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/video/android/SDL_androidevents.c
Expand Up @@ -32,20 +32,13 @@

#include "SDL_androidevents.h"

void Android_InitEvents(){

SDL_Keyboard keyboard;

SDL_zero(keyboard);
SDL_AddKeyboard(&keyboard, -1);

void Android_InitEvents()
{
SDLKey keymap[SDL_NUM_SCANCODES];

/* Add default scancode to key mapping */
SDL_GetDefaultKeymap(keymap);
SDL_SetKeymap(0, 0, keymap, SDL_NUM_SCANCODES);


SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES);
}

void
Expand Down Expand Up @@ -74,12 +67,12 @@ void Android_OnResize(int width, int height, int format){

int
Android_OnKeyDown(int keycode){
return SDL_SendKeyboardKey(0, SDL_PRESSED, (SDL_scancode)keycode);
return SDL_SendKeyboardKey(SDL_PRESSED, (SDL_scancode)keycode);
}

int
Android_OnKeyUp(int keycode){
return SDL_SendKeyboardKey(0, SDL_RELEASED, (SDL_scancode)keycode);
return SDL_SendKeyboardKey(SDL_RELEASED, (SDL_scancode)keycode);
}

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit f103186

Please sign in to comment.