Added patch to implement stub for shcore.SetProcessDpiAwareness.

This commit is contained in:
Sebastian Lackner 2016-01-24 16:23:31 +01:00
parent 2d441b9bd4
commit f2d347b897
3 changed files with 147 additions and 3 deletions

View File

@ -0,0 +1,141 @@
From f84cb2913cb755152d98c278f3ed6927167c9b2b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 24 Jan 2016 16:06:47 +0100
Subject: shcore: Add SetProcessDpiAwareness stub.
---
dlls/shcore/Makefile.in | 3 +++
dlls/shcore/main.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++
dlls/shcore/shcore.spec | 2 +-
include/Makefile.in | 1 +
include/shellscalingapi.h | 29 ++++++++++++++++++++++++++++
5 files changed, 83 insertions(+), 1 deletion(-)
create mode 100644 dlls/shcore/main.c
create mode 100644 include/shellscalingapi.h
diff --git a/dlls/shcore/Makefile.in b/dlls/shcore/Makefile.in
index dd5f08f..ec2e95f 100644
--- a/dlls/shcore/Makefile.in
+++ b/dlls/shcore/Makefile.in
@@ -1 +1,4 @@
MODULE = shcore.dll
+
+C_SRCS = \
+ main.c
diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c
new file mode 100644
index 0000000..0e59d38
--- /dev/null
+++ b/dlls/shcore/main.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2016 Sebastian Lackner
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "shellscalingapi.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shcore);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
+
+HRESULT WINAPI SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value)
+{
+ FIXME("(%u): stub\n", value);
+ return E_NOTIMPL;
+}
diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec
index 12a4ef3..1624319 100644
--- a/dlls/shcore/shcore.spec
+++ b/dlls/shcore/shcore.spec
@@ -78,6 +78,6 @@
@ stdcall SHUnicodeToAnsi(wstr ptr ptr) shlwapi.SHUnicodeToAnsi
@ stdcall SHUnicodeToUnicode(wstr ptr long) shlwapi.SHUnicodeToUnicode
@ stdcall SetCurrentProcessExplicitAppUserModelID(wstr) shell32.SetCurrentProcessExplicitAppUserModelID
-@ stub SetProcessDpiAwareness
+@ stdcall SetProcessDpiAwareness(long)
@ stub SetProcessReference
@ stub UnregisterScaleChangeEvent
diff --git a/include/Makefile.in b/include/Makefile.in
index 199de7a..c907afe4 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -570,6 +570,7 @@ HEADER_SRCS = \
sfc.h \
shdispid.h \
shellapi.h \
+ shellscalingapi.h \
shlguid.h \
shlobj.h \
shlwapi.h \
diff --git a/include/shellscalingapi.h b/include/shellscalingapi.h
new file mode 100644
index 0000000..6d7a167
--- /dev/null
+++ b/include/shellscalingapi.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2016 Sebastian Lackner
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_SHELLSCALINGAPI_H
+#define __WINE_SHELLSCALINGAPI_H
+
+typedef enum PROCESS_DPI_AWARENESS
+{
+ PROCESS_DPI_UNAWARE = 0,
+ PROCESS_SYSTEM_DPI_AWARE = 1,
+ PROCESS_PER_MONITOR_DPI_AWARE = 2,
+} PROCESS_DPI_AWARENESS;
+
+#endif /* __WINE_SHELLSCALINGAPI_H */
--
2.6.4

View File

@ -57,7 +57,7 @@ upstream_commit()
# Show version information
version()
{
echo "Wine Staging 1.9.2"
echo "Wine Staging 1.9.3 (unreleased)"
echo "Copyright (C) 2014-2016 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
@ -2614,7 +2614,8 @@ fi
# | win-uxtheme-themes-l1-1-0.spec, dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in, dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-
# | xaml-pal-l1-1-0.spec, dlls/ext-ms-win-xaml-pal-l1-1-0/main.c, dlls/iertutil/Makefile.in, dlls/iertutil/iertutil.spec,
# | dlls/iertutil/main.c, dlls/kernelbase/Makefile.in, dlls/kernelbase/kernelbase.spec, dlls/kernelbase/misc.c,
# | dlls/shcore/Makefile.in, dlls/shcore/shcore.spec, dlls/shlwapi/shlwapi.spec, tools/make_specfiles
# | dlls/shcore/Makefile.in, dlls/shcore/main.c, dlls/shcore/shcore.spec, dlls/shlwapi/shlwapi.spec, include/Makefile.in,
# | include/shellscalingapi.h, tools/make_specfiles
# |
if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
patch_apply api-ms-win-Stub_DLLs/0001-api-ms-win-core-com-l1-1-1-Add-dll.patch
@ -2647,6 +2648,7 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
patch_apply api-ms-win-Stub_DLLs/0028-api-ms-win-rtcore-ntuser-draw-l1-1-0-Add-dll.patch
patch_apply api-ms-win-Stub_DLLs/0029-ext-ms-win-rtcore-ntuser-sysparams-l1-1-0-Add-dll.patch
patch_apply api-ms-win-Stub_DLLs/0030-ext-ms-win-kernel32-package-current-l1-1-0-Add-dll.patch
patch_apply api-ms-win-Stub_DLLs/0031-shcore-Add-SetProcessDpiAwareness-stub.patch
(
echo '+ { "Michael Müller", "api-ms-win-core-com-l1-1-1: Add dll.", 1 },';
echo '+ { "Michael Müller", "kernelbase: Add dll and add stub for QuirkIsEnabled.", 1 },';
@ -2678,6 +2680,7 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
echo '+ { "Michael Müller", "api-ms-win-rtcore-ntuser-draw-l1-1-0: Add dll.", 1 },';
echo '+ { "Michael Müller", "ext-ms-win-rtcore-ntuser-sysparams-l1-1-0: Add dll.", 1 },';
echo '+ { "Michael Müller", "ext-ms-win-kernel32-package-current-l1-1-0: Add dll.", 1 },';
echo '+ { "Sebastian Lackner", "shcore: Add SetProcessDpiAwareness stub.", 1 },';
) >> "$patchlist"
fi

View File

@ -1 +1 @@
Wine Staging 1.9.2
Wine Staging 1.9.3 (unreleased)