Skip to content

Commit

Permalink
Fix for DnSpy hang and maybe other applications.
Browse files Browse the repository at this point in the history
  • Loading branch information
skulltrail committed Aug 19, 2024
1 parent f2ac1aa commit 29d0c33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions wrappers/base/user32_wrapper/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Revision History:

WINE_DEFAULT_DEBUG_CHANNEL(user32);

DPI_AWARENESS_CONTEXT Globalcontext = {0};
DPI_AWARENESS_CONTEXT Globalcontext = DPI_AWARENESS_CONTEXT_UNAWARE;
static DPI_AWARENESS dpi_awareness = 0;

int WINAPI GetSystemMetricsForDpi(int nIndex, UINT dpi) {
Expand Down Expand Up @@ -261,12 +261,11 @@ DPI_AWARENESS_CONTEXT WINAPI GetThreadDpiAwarenessContext(void)
*/
DPI_AWARENESS_CONTEXT WINAPI SetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT context )
{
DPI_AWARENESS_CONTEXT CurrentDpiAwareContext = Globalcontext;
Globalcontext = context;
return Globalcontext;
return CurrentDpiAwareContext;
}



// /***********************************************************************
// * GetAwarenessFromDpiAwarenessContext (USER32.@)
// */
Expand Down
2 changes: 1 addition & 1 deletion wrappers/base/user32_wrapper/user32_wrapper.spec
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@
@ stdcall GetSystemMetricsForDpi(long long)
@ stdcall GetDpiForSystem()
@ stdcall GetDpiForWindow(long)
@ stdcall GetThreadDpiAwarenessContext()
;@ stdcall GetThreadDpiAwarenessContext()
@ stdcall GetWindowDpiAwarenessContext(long)
@ stdcall SetThreadDpiAwarenessContext(ptr)
@ stdcall SystemParametersInfoForDpi(long long ptr long long)

0 comments on commit 29d0c33

Please sign in to comment.