mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
win32u: Move get_awareness_from_dpi_awareness_context.
This commit is contained in:
parent
777a9d0f51
commit
d96754213c
1 changed files with 21 additions and 21 deletions
|
@ -2187,6 +2187,27 @@ UINT get_win_monitor_dpi( HWND hwnd )
|
|||
return system_dpi;
|
||||
}
|
||||
|
||||
/* see GetAwarenessFromDpiAwarenessContext */
|
||||
static DPI_AWARENESS get_awareness_from_dpi_awareness_context( DPI_AWARENESS_CONTEXT context )
|
||||
{
|
||||
switch ((ULONG_PTR)context)
|
||||
{
|
||||
case 0x10:
|
||||
case 0x11:
|
||||
case 0x12:
|
||||
case 0x80000010:
|
||||
case 0x80000011:
|
||||
case 0x80000012:
|
||||
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;
|
||||
default:
|
||||
return DPI_AWARENESS_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* get_thread_dpi_awareness
|
||||
*/
|
||||
|
@ -2240,27 +2261,6 @@ UINT get_system_dpi(void)
|
|||
return system_dpi;
|
||||
}
|
||||
|
||||
/* see GetAwarenessFromDpiAwarenessContext */
|
||||
static DPI_AWARENESS get_awareness_from_dpi_awareness_context( DPI_AWARENESS_CONTEXT context )
|
||||
{
|
||||
switch ((ULONG_PTR)context)
|
||||
{
|
||||
case 0x10:
|
||||
case 0x11:
|
||||
case 0x12:
|
||||
case 0x80000010:
|
||||
case 0x80000011:
|
||||
case 0x80000012:
|
||||
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;
|
||||
default:
|
||||
return DPI_AWARENESS_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* SetThreadDpiAwarenessContext (win32u.so)
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue