Compare commits

...

5 Commits

Author SHA1 Message Date
Marco Bartoli
1b4cd6f752
Merge d6525e7907 into aabe4f68c7 2024-12-28 10:03:42 +01:00
Kleuter
aabe4f68c7
Merge pull request #29 from wsxarcher/patch-2
Fix mingw cross compilation on linux
2024-12-28 10:03:34 +01:00
Kleuter
263451546b
Merge pull request #30 from wsxarcher/patch-3
Fix gcc (mingw) compilation of pointer comparison in switch using ifs
2024-12-28 09:59:23 +01:00
wsxarcher
04ec1a740d fix gcc compilation of pointer comparison 2024-12-27 23:53:49 +01:00
Marco Bartoli
5a8a83f569 Fix mingw cross compilation 2024-12-16 02:02:54 +01:00
3 changed files with 13 additions and 17 deletions

View File

@ -12,7 +12,7 @@
#include <qt_windows.h>
#include <shlobj.h>
#include <VersionHelpers.h>
#include <versionhelpers.h>
#include <intshcut.h>
#include <qvarlengtharray.h>

View File

@ -12,7 +12,7 @@
#include <cstdio>
#include <VersionHelpers.h>
#include <versionhelpers.h>
QT_BEGIN_NAMESPACE

View File

@ -261,16 +261,13 @@ static BOOL GetDisplayAutoRotationPreferences(
static BOOL SetProcessDpiAwarenessContext(
IN DPI_AWARENESS_CONTEXT DpiContext)
{
switch ((ULONG_PTR)DpiContext) {
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE:
if ((ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE) {
//NOTHING;
break;
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE:
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE:
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2:
} else if ((ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ||
(ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ||
(ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) {
SetProcessDPIAware();
break;
default:
} else {
return FALSE;
}
@ -287,14 +284,13 @@ static BOOL AreDpiAwarenessContextsEqual(
static BOOL IsValidDpiAwarenessContext(
IN DPI_AWARENESS_CONTEXT Value)
{
switch ((ULONG_PTR)Value) {
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE:
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED:
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE:
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE:
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2:
if ((ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE ||
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ||
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ||
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ||
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) {
return TRUE;
default:
} else {
return FALSE;
}
}