Add device error checking utility functions.
TRAC #18606
Signed-off-by: Daniel Koch
Author: Shannon Woods
git-svn-id: https://angleproject.googlecode.com/svn/trunk@843 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/main.cpp b/src/libGLESv2/main.cpp
index ad11563..83ea8fe 100644
--- a/src/libGLESv2/main.cpp
+++ b/src/libGLESv2/main.cpp
@@ -7,6 +7,7 @@
// main.cpp: DLL entry point and management of thread-local data.
#include "libGLESv2/main.h"
+#include "libGLESv2/utilities.h"
#include "common/debug.h"
#include "libEGL/Surface.h"
@@ -106,6 +107,17 @@
return display->getDevice();
}
+
+bool checkDeviceLost(HRESULT errorCode)
+{
+ egl::Display *display = NULL;
+
+ if (isDeviceLostError(errorCode))
+ {
+ return true;
+ }
+ return false;
+}
}
// Records an error code