Fixed SDL 1.3 compilation

This commit is contained in:
pelya
2011-03-18 11:39:00 +02:00
parent 9fbb3b22a2
commit 21bf45e9ef
4 changed files with 21 additions and 6 deletions

View File

@@ -618,6 +618,13 @@ void ProcessDeferredMouseTap()
deferredMouseTap--;
if( deferredMouseTap <= 0 )
{
#if SDL_VERSION_ATLEAST(1,3,0)
SDL_Window * window = SDL_GetFocusWindow();
if( !window )
return;
#define SDL_ANDROID_sFakeWindowWidth window->w
#define SDL_ANDROID_sFakeWindowHeight window->h
#endif
if( oldMouseX + 1 < SDL_ANDROID_sFakeWindowWidth )
SDL_ANDROID_MainThreadPushMouseMotion(oldMouseX + 1, oldMouseY);
SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_LEFT );