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, used 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 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; }