[PATCH v2] user32: add stub for GetAutoRotationState

Fabian Maurer dark.shadow4 at web.de
Thu Dec 29 20:29:51 CST 2016


Fixes https://bugs.winehq.org/show_bug.cgi?id=42106

v2: Correct formatting in fixme message

Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
 dlls/user32/misc.c      | 14 ++++++++++++++
 dlls/user32/user32.spec |  1 +
 include/winuser.h       | 13 +++++++++++++
 3 files changed, 28 insertions(+)

diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index fa0502e25e..2a46d58f07 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -836,6 +836,20 @@ LONG WINAPI GetDisplayConfigBufferSizes(UINT32 flags, UINT32 *num_path_info, UIN
     return ERROR_NOT_SUPPORTED;
 }
 
+/**********************************************************************
+ * GetAutoRotationState [USER32.@]
+ */
+BOOL WINAPI GetAutoRotationState(PAR_STATE pState)
+{
+    FIXME("(%p): stub\n", pState);
+
+    if(!pState)
+        return FALSE;
+
+    *pState = AR_NOSENSOR;
+    return TRUE;
+}
+
 static const WCHAR imeW[] = {'I','M','E',0};
 const struct builtin_class_descr IME_builtin_class =
 {
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index 65a5bfe3c0..e53d57ca9e 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -251,6 +251,7 @@
 @ stdcall GetAppCompatFlags(long)
 @ stdcall GetAppCompatFlags2(long)
 @ stdcall GetAsyncKeyState(long)
+@ stdcall GetAutoRotationState(ptr)
 @ stdcall GetCapture()
 @ stdcall GetCaretBlinkTime()
 @ stdcall GetCaretPos(ptr)
diff --git a/include/winuser.h b/include/winuser.h
index 2b8331c3b6..c3b6f9246e 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -2654,6 +2654,18 @@ typedef struct {
 #define DCX_NORECOMPUTE      0x00100000
 #define DCX_VALIDATE         0x00200000
 
+/* Auto-rotation state */
+typedef enum tagAR_STATE {
+    AR_ENABLED       = 0x0,
+    AR_DISABLED      = 0x1,
+    AR_SUPPRESSED    = 0x2,
+    AR_REMOTESESSION = 0x4,
+    AR_MULTIMON      = 0x8,
+    AR_NOSENSOR      = 0x10,
+    AR_NOT_SUPPORTED = 0x20,
+    AR_DOCKED        = 0x40,
+    AR_LAPTOP        = 0x80
+} AR_STATE, *PAR_STATE;
 
 
 /* for GetMenuDefaultItem */
@@ -3561,6 +3573,7 @@ WINUSERAPI BOOL        WINAPI GetAltTabInfoW(HWND,INT,PALTTABINFO,LPWSTR,UINT);
 WINUSERAPI HWND        WINAPI GetAncestor(HWND,UINT);
 WINUSERAPI DWORD       WINAPI GetAppCompatFlags(HTASK);
 WINUSERAPI SHORT       WINAPI GetAsyncKeyState(INT);
+WINUSERAPI BOOL        WINAPI GetAutoRotationState(PAR_STATE pState);
 WINUSERAPI HWND        WINAPI GetCapture(void);
 WINUSERAPI UINT        WINAPI GetCaretBlinkTime(void);
 WINUSERAPI BOOL        WINAPI GetCaretPos(LPPOINT);
-- 
2.11.0




More information about the wine-patches mailing list