mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Minor update to broken nVidia RandR detection patch.
This commit is contained in:
parent
4bc20dfb8e
commit
5dc4aa102e
@ -1,25 +1,25 @@
|
||||
From dcaf0bbafbfa6cfb89803c363f464c4766c972ff Mon Sep 17 00:00:00 2001
|
||||
From 67db1e9c71c4fbc74790f91f00cd96e09fedd6d6 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Sat, 9 Aug 2014 13:15:09 -0600
|
||||
Subject: winex11.drv: Update the check for broken nVidia RandR to test for
|
||||
the number of resolutions instead of the number of modes.
|
||||
|
||||
---
|
||||
dlls/winex11.drv/xrandr.c | 48 +++++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 33 insertions(+), 15 deletions(-)
|
||||
dlls/winex11.drv/xrandr.c | 50 +++++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 35 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c
|
||||
index fc09020..bcad0ce 100644
|
||||
index fc09020..50c769c 100644
|
||||
--- a/dlls/winex11.drv/xrandr.c
|
||||
+++ b/dlls/winex11.drv/xrandr.c
|
||||
@@ -389,6 +389,7 @@ static int xrandr12_init_modes(void)
|
||||
@@ -386,6 +386,7 @@ static XRRCrtcInfo *xrandr12_get_primary_crtc_info( XRRScreenResources *resource
|
||||
|
||||
static int xrandr12_init_modes(void)
|
||||
{
|
||||
+ unsigned int resolution_count, modes;
|
||||
XRRScreenResources *resources;
|
||||
XRROutputInfo *output_info;
|
||||
XRRCrtcInfo *crtc_info;
|
||||
+ int resolution_count;
|
||||
int ret = -1;
|
||||
int i, j;
|
||||
|
||||
@@ -434,21 +435,6 @@ static int xrandr12_init_modes(void)
|
||||
goto done;
|
||||
}
|
||||
@ -42,12 +42,13 @@ index fc09020..bcad0ce 100644
|
||||
if (!(xrandr12_modes = HeapAlloc( GetProcessHeap(), 0, sizeof(*xrandr12_modes) * output_info->nmode )))
|
||||
{
|
||||
ERR("Failed to allocate xrandr mode info array.\n");
|
||||
@@ -480,6 +466,38 @@ static int xrandr12_init_modes(void)
|
||||
@@ -480,6 +466,40 @@ static int xrandr12_init_modes(void)
|
||||
}
|
||||
}
|
||||
|
||||
+ resolution_count = 0;
|
||||
+ for (i = 0; i < xrandr_mode_count; ++i)
|
||||
+ modes = X11DRV_Settings_GetModeCount();
|
||||
+ for (i = 0; i < modes; ++i)
|
||||
+ {
|
||||
+ int duplicate_resolution = 0;
|
||||
+
|
||||
@ -75,6 +76,7 @@ index fc09020..bcad0ce 100644
|
||||
+ ERR_(winediag)("Broken NVIDIA RandR detected, falling back to RandR 1.0. "
|
||||
+ "Please consider using the Nouveau driver instead.\n");
|
||||
+ ret = -1;
|
||||
+ HeapFree( GetProcessHeap(), 0, xrandr12_modes );
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user