Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
-- v3: ntdll: Fake success for ThreadPowerThrottlingState include: Add THREAD_POWER_THROTTLING_STATE type winex11.drv: Define ControlMask when not available
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/winex11.drv/bitblt.c | 3 +++ dlls/winex11.drv/event.c | 3 +++ dlls/winex11.drv/keyboard.c | 8 ++++++++ dlls/winex11.drv/mouse.c | 4 ++++ dlls/winex11.drv/window.c | 2 ++ dlls/winex11.drv/x11drv.h | 3 +++ dlls/winex11.drv/x11drv_main.c | 3 +++ 7 files changed, 26 insertions(+)
diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index d1e6407d87c..09e999c266a 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -46,6 +46,9 @@ # endif #endif
+/* X.h defines ControlMask but conflicts with struct variable name */ +#undef ControlMask + #include "windef.h" #include "winbase.h" #include "x11drv.h" diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index cbab1dcfe13..212c1d780eb 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -39,6 +39,9 @@ #include <stdarg.h> #include <string.h>
+/* X.h defines ControlMask but conflicts with struct variable name */ +#undef ControlMask + #include "windef.h" #include "winbase.h"
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 6157548474b..5409618a4ce 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -44,6 +44,9 @@
#define NONAMELESSUNION
+/* X.h defines ControlMask but conflicts with struct variable name */ +#undef ControlMask + #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -64,6 +67,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(keyboard); WINE_DECLARE_DEBUG_CHANNEL(key);
+/* X.h defines ControlMask but conflicts with struct variable name */ +#ifndef ControlMask +#define ControlMask (1<<2) +#endif + static int min_keycode, max_keycode, keysyms_per_keycode; static KeySym *key_mapping; static WORD keyc2vkey[256], keyc2scan[256]; diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index d0cdd3d4984..e14ce6d324b 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -50,6 +50,10 @@ MAKE_FUNCPTR(XcursorLibraryLoadCursor);
#define NONAMELESSUNION #define OEMRESOURCE + +/* X.h defines ControlMask but conflicts with struct variable name */ +#undef ControlMask + #include "windef.h" #include "winbase.h" #include "winreg.h" diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 773fa81f5f3..0232a1a048d 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -43,6 +43,8 @@
/* avoid conflict with field names in included win32 headers */ #undef Status +#undef ControlMask + #include "ntstatus.h" #define WIN32_NO_STATUS #include "windef.h" diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 613dc0e05fe..193852cc316 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -57,6 +57,9 @@ #undef Status /* avoid conflict with wintrnl.h */ typedef int Status;
+/* X.h defines ControlMask but conflicts with struct variable name */ +#undef ControlMask + #include "windef.h" #include "winbase.h" #include "ntgdi.h" diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 40d0e750d1b..885f8376a07 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -43,6 +43,9 @@ #include <X11/extensions/Xrender.h> #endif
+/* X.h defines ControlMask but conflicts with struct variable name */ +#undef ControlMask + #include "ntstatus.h" #define WIN32_NO_STATUS #include "windef.h"
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- include/processthreadsapi.h | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/include/processthreadsapi.h b/include/processthreadsapi.h index d266b7a727b..f2554950952 100644 --- a/include/processthreadsapi.h +++ b/include/processthreadsapi.h @@ -37,6 +37,13 @@ typedef struct _MEMORY_PRIORITY_INFORMATION ULONG MemoryPriority; } MEMORY_PRIORITY_INFORMATION, *PMEMORY_PRIORITY_INFORMATION;
+typedef struct _THREAD_POWER_THROTTLING_STATE +{ + ULONG Version; + ULONG ControlMask; + ULONG StateMask; +} THREAD_POWER_THROTTLING_STATE; + WINBASEAPI HRESULT WINAPI GetThreadDescription(HANDLE,PWSTR *); WINBASEAPI HRESULT WINAPI SetThreadDescription(HANDLE,PCWSTR); WINBASEAPI BOOL WINAPI SetThreadInformation(HANDLE,THREAD_INFORMATION_CLASS,LPVOID,DWORD);
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52956 Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/ntdll/unix/thread.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index 6d937675bcb..15bb3be34b2 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -2255,6 +2255,12 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, FIXME( "ThreadEnableAlignmentFaultFixup stub!\n" ); return STATUS_SUCCESS;
+ case ThreadPowerThrottlingState: + if (length != sizeof(THREAD_POWER_THROTTLING_STATE)) return STATUS_INFO_LENGTH_MISMATCH; + if (!data) return STATUS_ACCESS_VIOLATION; + FIXME( "ThreadPowerThrottling stub!\n" ); + return STATUS_SUCCESS; + case ThreadBasicInformation: case ThreadTimes: case ThreadPriority:
I was thinking something like this, so it's could be done in a single place:
[1.diff](/uploads/7267af2140d1417b01cfe73a03c2dee7/1.diff)