vxiiduu / VxKex

Windows 7 API Extensions
855 stars 47 forks source link

bug in GetWindowDpiAwarenessContext? #275

Open kleuter opened 4 days ago

kleuter commented 4 days ago

Don't you think here should be == instead of = ?

KXUSERAPI DPI_AWARENESS_CONTEXT WINAPI GetWindowDpiAwarenessContext(
    IN  HWND    Window)
{
    ULONG WindowThreadId;
    ULONG WindowProcessId;

    WindowThreadId = GetWindowThreadProcessId(Window, &WindowProcessId);
    if (!WindowThreadId) {
        return 0;
    }

    if (WindowProcessId = (ULONG) NtCurrentTeb()->ClientId.UniqueProcess) { // == ?
        return GetThreadDpiAwarenessContext();
    }

    return DPI_AWARENESS_CONTEXT_UNAWARE;
}