The failed mode error message dumps all the mode fields, that were being tested. Change this output so that only the mode fields explicitly being matched against are displayed. Make the failed message use formatting consist with the trace message, earlier in this function.
Signed-off-by: Rob Walker bob.mt.wya@gmail.com --- 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 afa26cf543..953413390e 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; + 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)); @@ -422,9 +423,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 (devmode->dmFields & DM_BITSPERPEL) + snprintf(bbp_buffer, ARRAY_SIZE(bbp_buffer), "bbp=%d ", devmode->dmBitsPerPel); + if ((devmode->dmFields & DM_DISPLAYFREQUENCY) && (devmode->dmDisplayFrequency != 0)) + 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; }