Stefan Riesenberger : opengl32: Add wrapper for wglCreateContext.

Alexandre Julliard julliard at winehq.org
Tue Feb 26 15:13:57 CST 2019


Module: wine
Branch: master
Commit: 4285c619a07de29df2c51de198c65104678d1c78
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4285c619a07de29df2c51de198c65104678d1c78

Author: Stefan Riesenberger <stefan.riesenberger at gmail.com>
Date:   Mon Feb 25 18:34:36 2019 +0100

opengl32: Add wrapper for wglCreateContext.

Signed-off-by: Stefan Riesenberger <stefan.riesenberger at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/opengl32/wgl.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 9241005..c6018b0 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -398,9 +398,9 @@ HDC WINAPI wglGetCurrentDC(void)
 }
 
 /***********************************************************************
- *		wglCreateContext (OPENGL32.@)
+ *		wgl_create_context wrapper for hooking
  */
-HGLRC WINAPI wglCreateContext(HDC hdc)
+static HGLRC wgl_create_context(HDC hdc)
 {
     HGLRC ret = 0;
     struct wgl_context *drv_ctx;
@@ -420,6 +420,14 @@ HGLRC WINAPI wglCreateContext(HDC hdc)
 }
 
 /***********************************************************************
+ *		wglCreateContext (OPENGL32.@)
+ */
+HGLRC WINAPI wglCreateContext(HDC hdc)
+{
+    return wgl_create_context(hdc);
+}
+
+/***********************************************************************
  *		wglGetCurrentContext (OPENGL32.@)
  */
 HGLRC WINAPI wglGetCurrentContext(void)
@@ -667,7 +675,7 @@ HGLRC WINAPI wglCreateLayerContext(HDC hdc,
   TRACE("(%p,%d)\n", hdc, iLayerPlane);
 
   if (iLayerPlane == 0) {
-      return wglCreateContext(hdc);
+      return wgl_create_context(hdc);
   }
   FIXME("no handler for layer %d\n", iLayerPlane);
 
@@ -1212,8 +1220,8 @@ BOOL WINAPI wglUseFontBitmapsW(HDC hdc, DWORD first, DWORD count, DWORD listBase
 
 static void fixed_to_double(POINTFX fixed, UINT em_size, GLdouble vertex[3])
 {
-    vertex[0] = (fixed.x.value + (GLdouble)fixed.x.fract / (1 << 16)) / em_size;  
-    vertex[1] = (fixed.y.value + (GLdouble)fixed.y.fract / (1 << 16)) / em_size;  
+    vertex[0] = (fixed.x.value + (GLdouble)fixed.x.fract / (1 << 16)) / em_size;
+    vertex[1] = (fixed.y.value + (GLdouble)fixed.y.fract / (1 << 16)) / em_size;
     vertex[2] = 0.0;
 }
 
@@ -1393,7 +1401,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc,
             lpgmf->gmfCellIncY = (float)gm.gmCellIncY / em_size;
 
             TRACE("%fx%f at %f,%f inc %f,%f\n", lpgmf->gmfBlackBoxX, lpgmf->gmfBlackBoxY,
-                  lpgmf->gmfptGlyphOrigin.x, lpgmf->gmfptGlyphOrigin.y, lpgmf->gmfCellIncX, lpgmf->gmfCellIncY); 
+                  lpgmf->gmfptGlyphOrigin.x, lpgmf->gmfptGlyphOrigin.y, lpgmf->gmfCellIncX, lpgmf->gmfCellIncY);
             lpgmf++;
         }
 




More information about the wine-cvs mailing list