--- dlls/winex11.drv/settings.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index afa26cf543..b0164d5806 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -344,7 +344,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, { DWORD i, dwBpp = 0; DEVMODEW dm; - BOOL def_mode = TRUE; + BOOL def_mode = TRUE, test_bpp, test_frequency;
TRACE("(%s,%p,%p,0x%08x,%p)\n",debugstr_w(devname),devmode,hwnd,flags,lpvoid); TRACE("flags=%s\n",_CDS_flags(flags)); @@ -387,29 +387,24 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, return DISP_CHANGE_BADMODE; }
+ test_bpp = devmode->dmFields & DM_BITSPERPEL; + test_frequency = (devmode->dmFields & DM_DISPLAYFREQUENCY) && + (devmode->dmDisplayFrequency != 0); for (i = 0; i < dd_mode_count; i++) { - if (devmode->dmFields & DM_BITSPERPEL) + if (devmode->dmPelsWidth != dd_modes[i].width) continue; + if (devmode->dmPelsHeight != dd_modes[i].height) continue; + if (test_bpp) { if (dwBpp != dd_modes[i].bpp) continue; } - if (devmode->dmFields & DM_PELSWIDTH) - { - if (devmode->dmPelsWidth != dd_modes[i].width) - continue; - } - if (devmode->dmFields & DM_PELSHEIGHT) - { - if (devmode->dmPelsHeight != dd_modes[i].height) - continue; - } - if ((devmode->dmFields & DM_DISPLAYFREQUENCY) && (dd_modes[i].refresh_rate != 0) && - devmode->dmDisplayFrequency != 0) + if (test_frequency && (dd_modes[i].refresh_rate != 0)) { if (devmode->dmDisplayFrequency != dd_modes[i].refresh_rate) continue; } + /* we have a valid mode */ TRACE("Requested display settings match mode %d (%s)\n", i, handler_name);
--- dlls/winex11.drv/settings.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index b0164d5806..733a7130f1 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -345,6 +345,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, DWORD i, dwBpp = 0; DEVMODEW dm; BOOL def_mode = TRUE, test_bpp, test_frequency; + char bbp_buffer[16] = "", freq_buffer[16] = "";
TRACE("(%s,%p,%p,0x%08x,%p)\n",debugstr_w(devname),devmode,hwnd,flags,lpvoid); TRACE("flags=%s\n",_CDS_flags(flags)); @@ -417,9 +418,13 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, return DISP_CHANGE_SUCCESSFUL; }
- /* no valid modes found */ - ERR("No matching mode found %ux%ux%u @%u! (%s)\n", - devmode->dmPelsWidth, devmode->dmPelsHeight, - devmode->dmBitsPerPel, devmode->dmDisplayFrequency, handler_name); + /* no valid modes found, only print the fields we were trying to matching against */ + if (test_bpp) + snprintf(bbp_buffer, ARRAY_SIZE(bbp_buffer), "bbp=%d ", devmode->dmBitsPerPel); + if (test_frequency) + snprintf(freq_buffer, ARRAY_SIZE(freq_buffer), "freq=%d ", devmode->dmDisplayFrequency); + ERR("No matching mode found: width=%d height=%d %s%s(%s)\n", + devmode->dmPelsWidth, devmode->dmPelsHeight, bbp_buffer, freq_buffer, handler_name); + return DISP_CHANGE_BADMODE; }
The subject line in this and other patch seem overlong. Make sure you format the subject line correctly and separate it from rest of the commit message by a blank line.
On Mon, 6 Aug 2018, 19:47 Rob Walker, bob.mt.wya@gmail.com wrote:
dlls/winex11.drv/settings.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index afa26cf543..b0164d5806 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -344,7 +344,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, { DWORD i, dwBpp = 0; DEVMODEW dm;
- BOOL def_mode = TRUE;
- BOOL def_mode = TRUE, test_bpp, test_frequency;
TRACE("(%s,%p,%p,0x%08x,%p)\n",debugstr_w(devname),devmode,hwnd,flags,lpvoid); TRACE("flags=%s\n",_CDS_flags(flags)); @@ -387,29 +387,24 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, return DISP_CHANGE_BADMODE; }
- test_bpp = devmode->dmFields & DM_BITSPERPEL;
- test_frequency = (devmode->dmFields & DM_DISPLAYFREQUENCY) &&
for (i = 0; i < dd_mode_count; i++) {(devmode->dmDisplayFrequency != 0);
if (devmode->dmFields & DM_BITSPERPEL)
if (devmode->dmPelsWidth != dd_modes[i].width) continue;
if (devmode->dmPelsHeight != dd_modes[i].height) continue;
if (test_bpp) { if (dwBpp != dd_modes[i].bpp) continue; }
if (devmode->dmFields & DM_PELSWIDTH)
{
if (devmode->dmPelsWidth != dd_modes[i].width)
continue;
}
if (devmode->dmFields & DM_PELSHEIGHT)
{
if (devmode->dmPelsHeight != dd_modes[i].height)
continue;
}
if ((devmode->dmFields & DM_DISPLAYFREQUENCY) &&
(dd_modes[i].refresh_rate != 0) &&
devmode->dmDisplayFrequency != 0)
if (test_frequency && (dd_modes[i].refresh_rate != 0)) { if (devmode->dmDisplayFrequency != dd_modes[i].refresh_rate) continue; }
/* we have a valid mode */ TRACE("Requested display settings match mode %d (%s)\n", i,
handler_name);
-- 2.18.0
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=40496
Your paranoid android.
=== debian9 (build) === error: corrupt patch at line 83 Task: Patch failed to apply