Use TestCooperativeLevel instead of ValidateDevice to check for device loss.

TRAC #12547 ValidateDevice checks for correct rendering state as well, which we don't need. Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@354 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 34b99cdf
...@@ -824,9 +824,8 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface ...@@ -824,9 +824,8 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface
egl::Display *display = static_cast<egl::Display*>(dpy); egl::Display *display = static_cast<egl::Display*>(dpy);
gl::Context *context = static_cast<gl::Context*>(ctx); gl::Context *context = static_cast<gl::Context*>(ctx);
IDirect3DDevice9 *device = display->getDevice(); IDirect3DDevice9 *device = display->getDevice();
DWORD passes;
if (!device || device->ValidateDevice(&passes) == D3DERR_DEVICELOST) if (!device || device->TestCooperativeLevel() != D3D_OK)
{ {
return error(EGL_CONTEXT_LOST, EGL_FALSE); return error(EGL_CONTEXT_LOST, EGL_FALSE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment