summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor <egor.yusov@gmail.com>2018-02-11 19:10:56 +0000
committerEgor <egor.yusov@gmail.com>2018-02-11 19:10:56 +0000
commit9856f795a7105eb12c0ec3de7576190f227891e1 (patch)
treebf36e2c4b8ff7cef944f7f1da7b8c12636b0b658 /Graphics/GraphicsEngineOpenGL
parentFixed Android crash when SwapBuffers() is called after Suspend() (diff)
downloadDiligentCore-9856f795a7105eb12c0ec3de7576190f227891e1.tar.gz
DiligentCore-9856f795a7105eb12c0ec3de7576190f227891e1.zip
One more fix for Android context
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp b/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp
index 0dce35d3..47353a04 100644
--- a/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp
@@ -294,7 +294,14 @@ namespace Diligent
if( err == EGL_BAD_SURFACE )
{
LOG_INFO_MESSAGE("EGL surface has been lost. Attempting to recreate");
- InitEGLSurface();
+ try
+ {
+ InitEGLSurface();
+ }
+ catch(std::runtime_error &)
+ {
+ LOG_ERROR_MESSAGE("Failed to recreate EGL surface");
+ }
//return EGL_SUCCESS; //Still consider glContext is valid
}
else if( err == EGL_CONTEXT_LOST || err == EGL_BAD_CONTEXT )