You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patch to fix arguments for OSMesaMakeCurrent when using 16 bit formats.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From 8593f7d027c48153b038895e8bc0b8fca88fd666 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 3 Feb 2015 11:07:38 +0100
|
||||
Subject: gdi32: Fix arguments for OSMesaMakeCurrent when using 16 bit formats.
|
||||
|
||||
---
|
||||
dlls/gdi32/dibdrv/opengl.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/gdi32/dibdrv/opengl.c b/dlls/gdi32/dibdrv/opengl.c
|
||||
index 28a03f4..a25da208 100644
|
||||
--- a/dlls/gdi32/dibdrv/opengl.c
|
||||
+++ b/dlls/gdi32/dibdrv/opengl.c
|
||||
@@ -251,6 +251,7 @@ static BOOL dibdrv_wglMakeCurrent( HDC hdc, struct wgl_context *context )
|
||||
HBITMAP bitmap;
|
||||
BITMAPOBJ *bmp;
|
||||
dib_info dib;
|
||||
+ GLenum type;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
if (!context)
|
||||
@@ -281,7 +282,12 @@ static BOOL dibdrv_wglMakeCurrent( HDC hdc, struct wgl_context *context )
|
||||
|
||||
TRACE( "context %p bits %p size %ux%u\n", context, bits, width, height );
|
||||
|
||||
- ret = pOSMesaMakeCurrent( context->context, bits, GL_UNSIGNED_BYTE, width, height );
|
||||
+ if (pixel_formats[context->format - 1].mesa == OSMESA_RGB_565)
|
||||
+ type = GL_UNSIGNED_SHORT_5_6_5;
|
||||
+ else
|
||||
+ type = GL_UNSIGNED_BYTE;
|
||||
+
|
||||
+ ret = pOSMesaMakeCurrent( context->context, bits, type, width, height );
|
||||
if (ret)
|
||||
{
|
||||
pOSMesaPixelStore( OSMESA_ROW_LENGTH, abs( dib.stride ) * 8 / dib.bit_count );
|
||||
--
|
||||
2.2.2
|
||||
|
1
patches/gdi32-OSMesaMakeCurrent/definition
Normal file
1
patches/gdi32-OSMesaMakeCurrent/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: Fix arguments for OSMesaMakeCurrent when using 16 bit formats
|
Reference in New Issue
Block a user