From 707f4c96ba697ce13291e50e382d9de2e9736b58 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Thu, 3 Aug 2017 22:05:02 -0500 Subject: [PATCH] UI: Fix incorrect declarations for winapi functions --- src/xenia/ui/window_win.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/ui/window_win.cc b/src/xenia/ui/window_win.cc index 65745145e..2c9bfe54c 100644 --- a/src/xenia/ui/window_win.cc +++ b/src/xenia/ui/window_win.cc @@ -50,7 +50,7 @@ bool Win32Window::OnCreate() { static bool has_registered_class = false; if (!has_registered_class) { // Tell Windows that we're DPI aware. - auto spda = (HRESULT(*)(PROCESS_DPI_AWARENESS value))GetProcAddress( + auto spda = (decltype(&SetProcessDpiAwareness))GetProcAddress( GetModuleHandle(L"shcore.dll"), "SetProcessDpiAwareness"); if (spda) { auto res = spda(PROCESS_PER_MONITOR_DPI_AWARE); @@ -466,7 +466,7 @@ LRESULT Win32Window::WndProc(HWND hWnd, UINT message, WPARAM wParam, } break; case WM_NCCREATE: { // Tell Windows to automatically scale non-client areas on different DPIs. - auto en = (BOOL(*)(HWND hwnd))GetProcAddress( + auto en = (BOOL(WINAPI*)(HWND hwnd))GetProcAddress( GetModuleHandle(L"user32.dll"), "EnableNonClientDpiScaling"); if (en) { en(hWnd);