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 wglDescribePixelFormat when NULL is passed as pixel format descriptor.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
From 69bb805398645531fbc224319ab99dab29129c68 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 8 Nov 2014 11:32:11 +0100
|
||||
Subject: gdi32: Return maximum number of pixel formats when NULL pointer is
|
||||
passed to wglDescribePixelFormat.
|
||||
|
||||
---
|
||||
dlls/gdi32/dibdrv/opengl.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/gdi32/dibdrv/opengl.c b/dlls/gdi32/dibdrv/opengl.c
|
||||
index 28a03f4..edbd2e9 100644
|
||||
--- a/dlls/gdi32/dibdrv/opengl.c
|
||||
+++ b/dlls/gdi32/dibdrv/opengl.c
|
||||
@@ -149,7 +149,8 @@ static int dibdrv_wglDescribePixelFormat( HDC hdc, int fmt, UINT size, PIXELFORM
|
||||
{
|
||||
int ret = sizeof(pixel_formats) / sizeof(pixel_formats[0]);
|
||||
|
||||
- if (fmt <= 0 || fmt > ret) return ret;
|
||||
+ if (!descr) return ret;
|
||||
+ if (fmt <= 0 || fmt > ret) return ret; /* FIXME: should this be 0? */
|
||||
if (size < sizeof(*descr)) return 0;
|
||||
|
||||
memset( descr, 0, sizeof(*descr) );
|
||||
--
|
||||
2.1.3
|
||||
|
4
patches/gdi32-MaxPixelFormats/definition
Normal file
4
patches/gdi32-MaxPixelFormats/definition
Normal file
@@ -0,0 +1,4 @@
|
||||
Author: Sebastian Lackner
|
||||
Subject: Return maximum number of pixel formats when NULL pointer is passed to wglDescribePixelFormat.
|
||||
Revision: 1
|
||||
Fixes: [6176] wglDescribePixelFormat should return max index for NULL descriptor
|
Reference in New Issue
Block a user