Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-08-14 21:28:18 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-08-14 22:38:13 +0300
commit4fcca6a0abb4bc19854c0a41c00725954345248d (patch)
tree1b87ed21f24f995beb82a259a2327ca9fcca66aa /intern/ghost/intern/GHOST_Context.cpp
parentcb65542d2c49c2008c040fecd1f181b024f2a468 (diff)
GHOST: Make win32 errors more readable on some drivers
Diffstat (limited to 'intern/ghost/intern/GHOST_Context.cpp')
-rw-r--r--intern/ghost/intern/GHOST_Context.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_Context.cpp b/intern/ghost/intern/GHOST_Context.cpp
index 823a476d244..e02f73ad12a 100644
--- a/intern/ghost/intern/GHOST_Context.cpp
+++ b/intern/ghost/intern/GHOST_Context.cpp
@@ -59,7 +59,10 @@ bool win32_chk(bool result, const char *file, int line, const char *text)
DWORD count = 0;
- switch (error) {
+ /* Some drivers returns a HRESULT instead of a standard error message.
+ * i.e: 0xC0072095 instead of 0x2095 for ERROR_INVALID_VERSION_ARB
+ * So strip down the error to the valid error code range. */
+ switch (error & 0x0000FFFF) {
case ERROR_INVALID_VERSION_ARB:
msg = "The specified OpenGL version and feature set are either invalid or not supported.\n";
break;