Rebase against 3edbb2a4fdd2fb46a7af13c921bcd4bf8b7ab718.

This commit is contained in:
Zebediah Figura 2018-07-04 00:13:50 +02:00
parent a505e3815f
commit d53fc8ece0
4 changed files with 7 additions and 110 deletions

View File

@ -1 +1 @@
Fixes: Add stub for _SetWinRTOutOfMemoryExceptionCallback
Fixes: [45394] Add stub for _SetWinRTOutOfMemoryExceptionCallback

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "86864486be64a277f6edf8e66709cd0f17a4eed9"
echo "3edbb2a4fdd2fb46a7af13c921bcd4bf8b7ab718"
}
# Show version information
@ -329,7 +329,6 @@ patch_enable_all ()
enable_user32_DrawMenuItem="$1"
enable_user32_DrawTextExW="$1"
enable_user32_FlashWindowEx="$1"
enable_user32_GetAutoRotationState="$1"
enable_user32_GetSystemMetrics="$1"
enable_user32_LR_LOADFROMFILE="$1"
enable_user32_ListBox_Size="$1"
@ -1164,9 +1163,6 @@ patch_enable ()
user32-FlashWindowEx)
enable_user32_FlashWindowEx="$2"
;;
user32-GetAutoRotationState)
enable_user32_GetAutoRotationState="$2"
;;
user32-GetSystemMetrics)
enable_user32_GetSystemMetrics="$2"
;;
@ -4600,6 +4596,9 @@ fi
# Patchset msvcr120-_SetWinRTOutOfMemoryExceptionCallback
# |
# | This patchset fixes the following Wine bugs:
# | * [#45394] Add stub for _SetWinRTOutOfMemoryExceptionCallback
# |
# | Modified files:
# | * dlls/msvcr120/msvcr120.spec, dlls/msvcr120_app/msvcr120_app.spec, dlls/msvcrt/misc.c
# |
@ -6082,6 +6081,7 @@ fi
# |
# | This patchset fixes the following Wine bugs:
# | * [#44629] Process Hacker can't enumerate handles
# | * [#45374] Yet Another Process Monitor (.NET 2.0 app) reports System.AccessViolationException
# |
# | Modified files:
# | * dlls/ntdll/nt.c, dlls/ntdll/om.c, dlls/ntdll/tests/info.c, dlls/ntdll/tests/om.c, include/winternl.h,
@ -6844,18 +6844,6 @@ if test "$enable_user32_FlashWindowEx" -eq 1; then
) >> "$patchlist"
fi
# Patchset user32-GetAutoRotationState
# |
# | Modified files:
# | * dlls/user32/sysparams.c, dlls/user32/tests/sysparams.c
# |
if test "$enable_user32_GetAutoRotationState" -eq 1; then
patch_apply user32-GetAutoRotationState/0001-user32-Add-semi-stub-for-GetAutoRotationState.patch
(
printf '%s\n' '+ { "Michael Müller", "user32: Add semi-stub for GetAutoRotationState.", 1 },';
) >> "$patchlist"
fi
# Patchset user32-GetSystemMetrics
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,3 +1,4 @@
Fixes: [44629] Process Hacker can't enumerate handles
Fixes: [45374] Yet Another Process Monitor (.NET 2.0 app) reports System.AccessViolationException
Depends: server-Shared_Memory
Depends: server-Misc_ACL

View File

@ -1,92 +0,0 @@
From 1e70ffc87cfb0fc1c287bd1800a0023f673e9874 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 8 Jan 2017 18:22:30 +0100
Subject: [PATCH] user32: Add semi-stub for GetAutoRotationState.
---
dlls/user32/sysparams.c | 11 +++++++++--
dlls/user32/tests/sysparams.c | 25 +++++++++++++++++++++++++
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
index 6a5482b..6f8ebf3 100644
--- a/dlls/user32/sysparams.c
+++ b/dlls/user32/sysparams.c
@@ -3408,8 +3408,15 @@ BOOL WINAPI PhysicalToLogicalPointForPerMonitorDPI( HWND hwnd, POINT *pt )
*/
BOOL WINAPI GetAutoRotationState( AR_STATE *state )
{
- FIXME("(%p): stub\n", state);
- *state = AR_NOT_SUPPORTED;
+ TRACE("(%p)\n", state);
+
+ if (!state)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ *state = AR_NOSENSOR;
return TRUE;
}
diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c
index a4247f2..da3a67a 100644
--- a/dlls/user32/tests/sysparams.c
+++ b/dlls/user32/tests/sysparams.c
@@ -55,6 +55,7 @@ static INT (WINAPI *pGetSystemMetricsForDpi)(INT,UINT);
static BOOL (WINAPI *pSystemParametersInfoForDpi)(UINT,UINT,void*,UINT,UINT);
static BOOL (WINAPI *pLogicalToPhysicalPointForPerMonitorDPI)(HWND,POINT*);
static BOOL (WINAPI *pPhysicalToLogicalPointForPerMonitorDPI)(HWND,POINT*);
+static LONG (WINAPI *pGetAutoRotationState)(PAR_STATE);
static BOOL strict;
static int dpi, real_dpi;
@@ -3570,6 +3571,28 @@ static void test_window_dpi(void)
pSetThreadDpiAwarenessContext( orig );
}
+static void test_GetAutoRotationState(void)
+{
+ AR_STATE state;
+ BOOL ret;
+
+ if (!pGetAutoRotationState)
+ {
+ win_skip("GetAutoRotationState not supported\n");
+ return;
+ }
+
+ SetLastError(0xdeadbeef);
+ ret = pGetAutoRotationState(NULL);
+ ok(!ret, "Expected GetAutoRotationState to fail\n");
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+
+ state = 0;
+ ret = pGetAutoRotationState(&state);
+ ok(ret, "Expected GetAutoRotationState to succeed, error %d\n", GetLastError());
+ ok((state & AR_NOSENSOR) != 0, "Expected AR_NOSENSOR, got %d\n", state);
+}
+
START_TEST(sysparams)
{
int argc;
@@ -3599,6 +3622,7 @@ START_TEST(sysparams)
pSystemParametersInfoForDpi = (void*)GetProcAddress(hdll, "SystemParametersInfoForDpi");
pLogicalToPhysicalPointForPerMonitorDPI = (void*)GetProcAddress(hdll, "LogicalToPhysicalPointForPerMonitorDPI");
pPhysicalToLogicalPointForPerMonitorDPI = (void*)GetProcAddress(hdll, "PhysicalToLogicalPointForPerMonitorDPI");
+ pGetAutoRotationState = (void*)GetProcAddress(hdll, "GetAutoRotationState");
hInstance = GetModuleHandleA( NULL );
hdc = GetDC(0);
@@ -3620,6 +3644,7 @@ START_TEST(sysparams)
test_metrics_for_dpi( 192 );
test_EnumDisplaySettings( );
test_GetSysColorBrush( );
+ test_GetAutoRotationState( );
change_counter = 0;
change_last_param = 0;
--
1.9.1