diff --git a/alienblaster/project/sdl/sdl-1.3/src/video/android/SDL_androidinput.c b/alienblaster/project/sdl/sdl-1.3/src/video/android/SDL_androidinput.c index b46f23bad..11a7eb24b 100644 --- a/alienblaster/project/sdl/sdl-1.3/src/video/android/SDL_androidinput.c +++ b/alienblaster/project/sdl/sdl-1.3/src/video/android/SDL_androidinput.c @@ -76,6 +76,8 @@ static SDL_scancode TranslateKey(int scancode, SDL_keysym *keysym) return keymap[scancode]; } +#define SDL_SendKeyboardKey(X, Y) SDL_SendKeyboardKey(X, Y, SDL_FALSE) + #else #define SDL_KEY2(X) SDLK_ ## X @@ -170,11 +172,10 @@ JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeMouse) ( JNIEnv* env, jobject thiz, j // Translate mouse coordinates #if SDL_VERSION_ATLEAST(1,3,0) - SDL_Renderer *renderer; - renderer = SDL_GetCurrentRenderer(SDL_TRUE); - if( renderer && renderer->window ) { - x = x * renderer->window->w / renderer->window->display->desktop_mode.w; - y = y * renderer->window->h / renderer->window->display->desktop_mode.h; + SDL_Window * window = SDL_GetFocusWindow(); + if( window && window->renderer->window ) { + x = x * window->w / window->display->desktop_mode.w; + y = y * window->h / window->display->desktop_mode.h; } #else x = x * SDL_ANDROID_sFakeWindowWidth / SDL_ANDROID_sWindowWidth; diff --git a/alienblaster/project/sdl/sdl-1.3/src/video/android/SDL_androidvideo-1.3.c b/alienblaster/project/sdl/sdl-1.3/src/video/android/SDL_androidvideo-1.3.c index c5ffe1f68..0a40b6cb2 100644 --- a/alienblaster/project/sdl/sdl-1.3/src/video/android/SDL_androidvideo-1.3.c +++ b/alienblaster/project/sdl/sdl-1.3/src/video/android/SDL_androidvideo-1.3.c @@ -98,6 +98,12 @@ static SDL_VideoDevice *ANDROID_CreateDevice(int devindex) return device; } +static int +ANDROID_Available(void) +{ + return 1; +} + VideoBootStrap ANDROID_bootstrap = { "android", "SDL Android video driver", ANDROID_Available, ANDROID_CreateDevice