Ken Thomases : opengl32: Fix get_current_context_type() to not shift the type bits down.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Feb 3 10:01:12 CST 2015


Module: wine
Branch: master
Commit: 4a6743e91353ffa8cfdf5183c6518bd95327a835
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4a6743e91353ffa8cfdf5183c6518bd95327a835

Author: Ken Thomases <ken at codeweavers.com>
Date:   Mon Feb  2 15:51:42 2015 -0600

opengl32: Fix get_current_context_type() to not shift the type bits down.

The result is compared directly with handle type values like HANDLE_CONTEXT
whose meaningful values are in the high nibble.

---

 dlls/opengl32/wgl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index cb91699..6ff54f0 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -165,7 +165,7 @@ static void free_handle_ptr( struct wgl_handle *ptr )
 static inline enum wgl_handle_type get_current_context_type(void)
 {
     if (!NtCurrentTeb()->glCurrentRC) return HANDLE_CONTEXT;
-    return (LOWORD(NtCurrentTeb()->glCurrentRC) & HANDLE_TYPE_MASK) >> 12;
+    return LOWORD(NtCurrentTeb()->glCurrentRC) & HANDLE_TYPE_MASK;
 }
 
 /***********************************************************************




More information about the wine-cvs mailing list