- Fixed issues with randomly crash at resume on Android platform.
- Fixed issues with Multi Touch events on Android platform. Missing log to rev4591: - Restored OGLES2 support for Android platform. - Improved log system on Android Platform. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@4592 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
fffdc650bb
commit
cce4f13096
|
@ -252,14 +252,17 @@ s32 CIrrDeviceAndroid::handleInput(android_app* app, AInputEvent* androidEvent)
|
||||||
s32 EventAction = AMotionEvent_getAction(androidEvent);
|
s32 EventAction = AMotionEvent_getAction(androidEvent);
|
||||||
|
|
||||||
bool MultiTouchEvent = true;
|
bool MultiTouchEvent = true;
|
||||||
|
bool Touched = false;
|
||||||
|
|
||||||
switch (EventAction)
|
switch (EventAction)
|
||||||
{
|
{
|
||||||
case AMOTION_EVENT_ACTION_DOWN:
|
case AMOTION_EVENT_ACTION_DOWN:
|
||||||
Event.MultiTouchInput.Event = EMTIE_PRESSED_DOWN;
|
Event.MultiTouchInput.Event = EMTIE_PRESSED_DOWN;
|
||||||
|
Touched = true;
|
||||||
break;
|
break;
|
||||||
case AMOTION_EVENT_ACTION_MOVE:
|
case AMOTION_EVENT_ACTION_MOVE:
|
||||||
Event.MultiTouchInput.Event = EMTIE_MOVED;
|
Event.MultiTouchInput.Event = EMTIE_MOVED;
|
||||||
|
Touched = true;
|
||||||
break;
|
break;
|
||||||
case AMOTION_EVENT_ACTION_UP:
|
case AMOTION_EVENT_ACTION_UP:
|
||||||
Event.MultiTouchInput.Event = EMTIE_LEFT_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.PrevX[i] = 0; // TODO
|
||||||
Event.MultiTouchInput.PrevY[i] = 0; // TODO
|
Event.MultiTouchInput.PrevY[i] = 0; // TODO
|
||||||
Event.MultiTouchInput.X[i] = AMotionEvent_getX(androidEvent, i);
|
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);
|
Device->postEventFromUser(Event);
|
||||||
|
|
|
@ -111,6 +111,10 @@ bool CEGLManager::createSurface()
|
||||||
if (EglSurface != EGL_NO_SURFACE)
|
if (EglSurface != EGL_NO_SURFACE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
|
||||||
|
EglWindow = (ANativeWindow*)Data->OGLESAndroid.window;
|
||||||
|
#endif
|
||||||
|
|
||||||
EGLint EglOpenGLBIT = 0;
|
EGLint EglOpenGLBIT = 0;
|
||||||
|
|
||||||
switch (Params.DriverType)
|
switch (Params.DriverType)
|
||||||
|
@ -229,10 +233,6 @@ bool CEGLManager::createSurface()
|
||||||
os::Printer::log("No full color buffer.");
|
os::Printer::log("No full color buffer.");
|
||||||
|
|
||||||
#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
|
#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;
|
EGLint Format = 0;
|
||||||
eglGetConfigAttrib(EglDisplay, EglConfig, EGL_NATIVE_VISUAL_ID, &Format);
|
eglGetConfigAttrib(EglDisplay, EglConfig, EGL_NATIVE_VISUAL_ID, &Format);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue