mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-01-23 04:14:32 +08:00
Compare commits
4 Commits
45d7e6576d
...
aabe4f68c7
Author | SHA1 | Date | |
---|---|---|---|
|
aabe4f68c7 | ||
|
263451546b | ||
|
04ec1a740d | ||
|
5a8a83f569 |
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <VersionHelpers.h>
|
#include <versionhelpers.h>
|
||||||
#include <intshcut.h>
|
#include <intshcut.h>
|
||||||
#include <qvarlengtharray.h>
|
#include <qvarlengtharray.h>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#include <VersionHelpers.h>
|
#include <versionhelpers.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -261,16 +261,13 @@ static BOOL GetDisplayAutoRotationPreferences(
|
|||||||
static BOOL SetProcessDpiAwarenessContext(
|
static BOOL SetProcessDpiAwarenessContext(
|
||||||
IN DPI_AWARENESS_CONTEXT DpiContext)
|
IN DPI_AWARENESS_CONTEXT DpiContext)
|
||||||
{
|
{
|
||||||
switch ((ULONG_PTR)DpiContext) {
|
if ((ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE) {
|
||||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE:
|
|
||||||
//NOTHING;
|
//NOTHING;
|
||||||
break;
|
} else if ((ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ||
|
||||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE:
|
(ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ||
|
||||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE:
|
(ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) {
|
||||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2:
|
|
||||||
SetProcessDPIAware();
|
SetProcessDPIAware();
|
||||||
break;
|
} else {
|
||||||
default:
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,14 +284,13 @@ static BOOL AreDpiAwarenessContextsEqual(
|
|||||||
static BOOL IsValidDpiAwarenessContext(
|
static BOOL IsValidDpiAwarenessContext(
|
||||||
IN DPI_AWARENESS_CONTEXT Value)
|
IN DPI_AWARENESS_CONTEXT Value)
|
||||||
{
|
{
|
||||||
switch ((ULONG_PTR)Value) {
|
if ((ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE ||
|
||||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE:
|
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ||
|
||||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED:
|
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ||
|
||||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE:
|
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ||
|
||||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE:
|
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) {
|
||||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2:
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
} else {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user