user32/sysparams: Handle more contexts in GetAwarenessFromDpiAwarenessContext.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55630
This commit is contained in:
Fabian Maurer 2024-02-09 20:11:44 +01:00 committed by Alexandre Julliard
parent d34cbe61db
commit 5ffed8830c
2 changed files with 4 additions and 3 deletions

View file

@ -656,14 +656,18 @@ DPI_AWARENESS WINAPI GetAwarenessFromDpiAwarenessContext( DPI_AWARENESS_CONTEXT
case 0x10:
case 0x11:
case 0x12:
case 0x22:
case 0x80000010:
case 0x80000011:
case 0x80000012:
case 0x80000022:
return (ULONG_PTR)context & 3;
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE:
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE:
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE:
return ~(ULONG_PTR)context;
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2:
return ~(ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE;
default:
return DPI_AWARENESS_INVALID;
}

View file

@ -3940,7 +3940,6 @@ static void test_dpi_context(void)
ok( awareness == (i & ~0x10), "%Ix: wrong value %u\n", i, awareness );
break;
case 0x22:
todo_wine
ok( awareness == DPI_AWARENESS_PER_MONITOR_AWARE || broken( awareness == DPI_AWARENESS_INVALID ) /* Win10 1709+ */,
"%Ix: wrong value %u\n", i, awareness );
break;
@ -3967,7 +3966,6 @@ static void test_dpi_context(void)
ok( awareness == (i & ~0x10), "%Ix: wrong value %u\n", i | 0x80000000, awareness );
break;
case 0x22:
todo_wine
ok( awareness == DPI_AWARENESS_PER_MONITOR_AWARE || broken ( awareness == DPI_AWARENESS_INVALID ) /* Win10 1709+ */,
"%Ix: wrong value %u\n", i, awareness );
break;
@ -3989,7 +3987,6 @@ static void test_dpi_context(void)
ok( pIsValidDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i ), "%Ix: not valid\n", ~i );
break;
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2:
todo_wine
ok( awareness == DPI_AWARENESS_PER_MONITOR_AWARE || broken ( awareness == DPI_AWARENESS_INVALID ), "%Ix: wrong value %u\n", ~i, awareness );
break;
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED: