win: use same code style
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
2a24f72cea
commit
32d29e39f6
|
@ -2378,13 +2378,12 @@ DpiAwareness Utils::getDpiAwarenessForCurrentProcess(bool *highest)
|
||||||
}
|
}
|
||||||
if (API_USER_AVAILABLE(IsProcessDPIAware)) {
|
if (API_USER_AVAILABLE(IsProcessDPIAware)) {
|
||||||
const BOOL isAware = API_CALL_FUNCTION(IsProcessDPIAware);
|
const BOOL isAware = API_CALL_FUNCTION(IsProcessDPIAware);
|
||||||
|
static constexpr const auto highestAvailable = DpiAwareness::System;
|
||||||
|
const auto result = ((isAware == FALSE) ? DpiAwareness::Unaware : DpiAwareness::System);
|
||||||
if (highest) {
|
if (highest) {
|
||||||
*highest = (isAware != FALSE);
|
*highest = (result == highestAvailable);
|
||||||
}
|
}
|
||||||
if (isAware) {
|
return result;
|
||||||
return DpiAwareness::System;
|
|
||||||
}
|
|
||||||
return DpiAwareness::Unaware;
|
|
||||||
}
|
}
|
||||||
return DpiAwareness::Unknown;
|
return DpiAwareness::Unknown;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue