mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Shutdown EGL properly when quitting render loop.
This commit is contained in:
parent
4a38a414f7
commit
f1afb50fd1
@ -358,13 +358,14 @@ void cInterfaceEGL::Shutdown() {
|
||||
}
|
||||
if (egl_ctx) {
|
||||
eglMakeCurrent(egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
if (!eglDestroyContext(egl_dpy, egl_ctx))
|
||||
NOTICE_LOG(G3D, "Could not destroy drawing context.");
|
||||
if (!eglDestroySurface(egl_dpy, egl_surf))
|
||||
NOTICE_LOG(G3D, "Could not destroy window surface.");
|
||||
if (!eglDestroyContext(egl_dpy, egl_ctx))
|
||||
NOTICE_LOG(G3D, "Could not destroy drawing context.");
|
||||
if (!eglTerminate(egl_dpy))
|
||||
NOTICE_LOG(G3D, "Could not destroy display connection.");
|
||||
egl_ctx = nullptr;
|
||||
egl_dpy = nullptr;
|
||||
egl_surf = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -94,6 +94,7 @@ bool AndroidEGLGraphicsContext::Init(ANativeWindow *wnd, int backbufferWidth, in
|
||||
|
||||
void AndroidEGLGraphicsContext::Shutdown() {
|
||||
gl->ClearCurrent();
|
||||
gl->Shutdown();
|
||||
delete gl;
|
||||
ANativeWindow_release(wnd_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user