When source_enum_display_settings() fails to find a display mode because the index is out of range, the index number in the log is always 0 because the same variable is decreased in the for loop to find the display mode, giving the impression that it fails to find the first display mode.
From: Zhiyi Zhang zzhang@codeweavers.com
When source_enum_display_settings() fails to find a display mode because the index is out of range, the index number in the log is always 0 because the same variable is decreased in the for loop to find the display mode, giving the impression that it fails to find the first display mode. --- dlls/win32u/sysparams.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 2fbc90e27e6..9b4bd289def 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -3920,6 +3920,7 @@ static BOOL source_enum_display_settings( const struct source *source, UINT inde { DEVMODEW current_mode = {.dmSize = sizeof(DEVMODEW)}; const DEVMODEW *source_mode; + unsigned int i = index;
if (!(flags & EDS_ROTATEDMODE) && !source_get_current_settings( source, ¤t_mode )) { @@ -3935,7 +3936,7 @@ static BOOL source_enum_display_settings( const struct source *source, UINT inde if (!(flags & EDS_RAWMODE) && (source_mode->dmFields & DM_DISPLAYFLAGS) && (source_mode->dmDisplayFlags & WINE_DM_UNSUPPORTED)) continue; - if (!index--) + if (!i--) { memcpy( &devmode->dmFields, &source_mode->dmFields, devmode->dmSize - FIELD_OFFSET(DEVMODEW, dmFields) ); devmode->dmDisplayFlags &= ~WINE_DM_UNSUPPORTED;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=149802
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: win.c:4070: Test failed: Expected active window 0000000000E9017A, got 0000000000000000. win.c:4071: Test failed: Expected focus window 0000000000E9017A, got 0000000000000000.