diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp b/tools/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp index dbecbe0b9..9c84a1754 100644 --- a/tools/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp +++ b/tools/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp @@ -556,11 +556,11 @@ static bool destroySurfaceIfNotCurrent(EglDisplay* dpy,SurfacePtr surface) { ThreadInfo* thread = getThreadInfo(); EglContext* currCtx = static_cast(thread->eglContext); - if(currCtx && !currCtx->usingSurface(surface)){ + if((!currCtx) || (currCtx && !currCtx->usingSurface(surface))){ if(surface->type() == EglSurface::PBUFFER) { EglOS::releasePbuffer(dpy->nativeType(),reinterpret_cast(surface->native())); - return true; } + return true; } return false; } diff --git a/tools/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp b/tools/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp index afb1ae4fb..54a69eb1b 100644 --- a/tools/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp +++ b/tools/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp @@ -724,7 +724,6 @@ GL_APICALL const GLubyte* GL_APIENTRY glGetString(GLenum name){ static GLubyte VENDOR[] = "Google"; static GLubyte RENDERER[] = "OpenGL ES 2.0"; static GLubyte VERSION[] = "OpenGL ES 2.0"; - static GLubyte EXTENSIONS[] = ""; static GLubyte SHADING[] = "OpenGL ES GLSL ES 1.0.17"; switch(name) { case GL_VENDOR: @@ -736,7 +735,7 @@ GL_APICALL const GLubyte* GL_APIENTRY glGetString(GLenum name){ case GL_SHADING_LANGUAGE_VERSION: return SHADING; case GL_EXTENSIONS: - return EXTENSIONS; + return (const GLubyte*)ctx->getExtensionString(); default: RET_AND_SET_ERROR_IF(true,GL_INVALID_ENUM,NULL); }