diff --git a/source/Irrlicht/Android/CIrrDeviceAndroid.cpp b/source/Irrlicht/Android/CIrrDeviceAndroid.cpp index 932cf692..5e664f79 100644 --- a/source/Irrlicht/Android/CIrrDeviceAndroid.cpp +++ b/source/Irrlicht/Android/CIrrDeviceAndroid.cpp @@ -252,14 +252,17 @@ s32 CIrrDeviceAndroid::handleInput(android_app* app, AInputEvent* androidEvent) s32 EventAction = AMotionEvent_getAction(androidEvent); bool MultiTouchEvent = true; + bool Touched = false; switch (EventAction) { case AMOTION_EVENT_ACTION_DOWN: Event.MultiTouchInput.Event = EMTIE_PRESSED_DOWN; + Touched = true; break; case AMOTION_EVENT_ACTION_MOVE: Event.MultiTouchInput.Event = EMTIE_MOVED; + Touched = true; break; case AMOTION_EVENT_ACTION_UP: Event.MultiTouchInput.Event = EMTIE_LEFT_UP; @@ -282,9 +285,9 @@ s32 CIrrDeviceAndroid::handleInput(android_app* app, AInputEvent* androidEvent) Event.MultiTouchInput.PrevX[i] = 0; // TODO Event.MultiTouchInput.PrevY[i] = 0; // TODO Event.MultiTouchInput.X[i] = AMotionEvent_getX(androidEvent, i); - Event.MultiTouchInput.Y[i] = AMotionEvent_getX(androidEvent, i); + Event.MultiTouchInput.Y[i] = AMotionEvent_getY(androidEvent, i); - Event.MultiTouchInput.Touched[i] = true; + Event.MultiTouchInput.Touched[i] = Touched; } Device->postEventFromUser(Event); diff --git a/source/Irrlicht/CEGLManager.cpp b/source/Irrlicht/CEGLManager.cpp index d591e67b..5845139c 100755 --- a/source/Irrlicht/CEGLManager.cpp +++ b/source/Irrlicht/CEGLManager.cpp @@ -111,6 +111,10 @@ bool CEGLManager::createSurface() if (EglSurface != EGL_NO_SURFACE) return true; +#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_) + EglWindow = (ANativeWindow*)Data->OGLESAndroid.window; +#endif + EGLint EglOpenGLBIT = 0; switch (Params.DriverType) @@ -229,10 +233,6 @@ bool CEGLManager::createSurface() os::Printer::log("No full color buffer."); #if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_) - /* EGL_NATIVE_VISUAL_ID is an attribute of the EGLConfig that is - * guaranteed to be accepted by ANativeWindow_setBuffersGeometry(). - * As soon as we picked a EGLConfig, we can safely reconfigure the - * ANativeWindow buffers to match, using EGL_NATIVE_VISUAL_ID. */ EGLint Format = 0; eglGetConfigAttrib(EglDisplay, EglConfig, EGL_NATIVE_VISUAL_ID, &Format);