-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patches: fix star citizen patch -- use stub, upstream implementation …
…does not work
- Loading branch information
1 parent
f6773b3
commit 2111516
Showing
2 changed files
with
28 additions
and
73 deletions.
There are no files selected for viewing
99 changes: 27 additions & 72 deletions
99
patches/wine-hotfixes/upstream/15aa8c6-fix-star-citizen-bug-52956.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,53 @@ | ||
From 15aa8c6fb81921811cb2c7f99ae43f31930b4c10 Mon Sep 17 00:00:00 2001 | ||
From: Nikolay Sivov <nsivov@codeweavers.com> | ||
Date: Fri, 20 May 2022 15:20:27 +0300 | ||
Subject: [PATCH] kernelbase: Add SetThreadInformation(). | ||
|
||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52956 | ||
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> | ||
Signed-off-by: Alexandre Julliard <julliard@winehq.org> | ||
--- | ||
dlls/kernel32/kernel32.spec | 1 + | ||
dlls/kernelbase/kernelbase.spec | 2 +- | ||
dlls/kernelbase/thread.c | 19 +++++++++++++++++++ | ||
include/processthreadsapi.h | 15 +++++++++++++++ | ||
4 files changed, 36 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec | ||
index ca339181e327..cbba3abdba0c 100644 | ||
--- a/dlls/kernel32/kernel32.spec | ||
+++ b/dlls/kernel32/kernel32.spec | ||
+++ a/dlls/kernel32/kernel32.spec | ||
@@ -1470,6 +1470,7 @@ | ||
@ stdcall -import SetThreadGroupAffinity(long ptr ptr) | ||
@ stdcall -import SetThreadIdealProcessor(long long) | ||
@ stdcall -import SetThreadIdealProcessorEx(long ptr ptr) | ||
+@ stdcall -import SetThreadInformation(long long ptr long) | ||
+@ stdcall SetThreadInformation(long long ptr long) | ||
@ stdcall -import SetThreadLocale(long) | ||
@ stdcall -import SetThreadPreferredUILanguages(long ptr ptr) | ||
@ stdcall -import SetThreadPriority(long long) | ||
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec | ||
index 791c36039189..fd9701dd20be 100644 | ||
--- a/dlls/kernelbase/kernelbase.spec | ||
+++ b/dlls/kernelbase/kernelbase.spec | ||
@@ -1520,7 +1520,7 @@ | ||
@ stdcall SetThreadGroupAffinity(long ptr ptr) | ||
@ stdcall SetThreadIdealProcessor(long long) | ||
@ stdcall SetThreadIdealProcessorEx(long ptr ptr) | ||
-# @ stub SetThreadInformation | ||
+@ stdcall SetThreadInformation(long long ptr long) | ||
@ stdcall SetThreadLocale(long) | ||
@ stdcall SetThreadPreferredUILanguages(long ptr ptr) | ||
@ stdcall SetThreadPriority(long long) | ||
diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c | ||
index 6ba58cf0a67e..f11d17748fe8 100644 | ||
--- a/dlls/kernelbase/thread.c | ||
+++ b/dlls/kernelbase/thread.c | ||
@@ -606,6 +606,25 @@ LANGID WINAPI DECLSPEC_HOTPATCH SetThreadUILanguage( LANGID langid ) | ||
--- a/dlls/kernel32/thread.c | ||
+++ a/dlls/kernel32/thread.c | ||
@@ -142,6 +142,23 @@ BOOL WINAPI GetThreadSelectorEntry( HANDLE thread, DWORD sel, LDT_ENTRY *ldtent | ||
} | ||
+/********************************************************************** | ||
+ * SetThreadInformation (kernelbase.@) | ||
|
||
|
||
+/*********************************************************************** | ||
+ * SetThreadInformation (KERNEL32.@) | ||
+ */ | ||
+BOOL WINAPI DECLSPEC_HOTPATCH SetThreadInformation( HANDLE thread, THREAD_INFORMATION_CLASS info_class, | ||
+ VOID *info, DWORD size ) | ||
+BOOL SetThreadInformation(HANDLE hThread, | ||
+ THREAD_INFORMATION_CLASS threadInformationClass, | ||
+ LPVOID threadInformation, | ||
+ DWORD threadInformationSize) | ||
+{ | ||
+ switch (info_class) | ||
+ { | ||
+ case ThreadMemoryPriority: | ||
+ return set_ntstatus( NtSetInformationThread( thread, ThreadPagePriority, info, size )); | ||
+ case ThreadPowerThrottling: | ||
+ return set_ntstatus( NtSetInformationThread( thread, ThreadPowerThrottlingState, info, size )); | ||
+ default: | ||
+ FIXME("Unsupported class %u.\n", info_class); | ||
+ return FALSE; | ||
+ } | ||
+ FIXME("(%p, %u, %p, %u): stub\n", | ||
+ hThread, | ||
+ threadInformationClass, | ||
+ threadInformation, | ||
+ threadInformationSize); | ||
+ return TRUE; | ||
+} | ||
+ | ||
+ | ||
/********************************************************************** | ||
* SuspendThread (kernelbase.@) | ||
*/ | ||
diff --git a/include/processthreadsapi.h b/include/processthreadsapi.h | ||
index 8cdaff4796a7..d266b7a727be 100644 | ||
/*********************************************************************** | ||
* GetCurrentThread [KERNEL32.@] Gets pseudohandle for current thread | ||
* | ||
--- a/include/processthreadsapi.h | ||
+++ b/include/processthreadsapi.h | ||
@@ -23,8 +23,23 @@ | ||
+++ a/include/processthreadsapi.h | ||
@@ -23,6 +23,14 @@ | ||
extern "C" { | ||
#endif | ||
|
||
+typedef enum _THREAD_INFORMATION_CLASS | ||
+{ | ||
|
||
+typedef enum _THREAD_INFORMATION_CLASS { | ||
+ ThreadMemoryPriority, | ||
+ ThreadAbsoluteCpuPriority, | ||
+ ThreadDynamicCodePolicy, | ||
+ ThreadPowerThrottling, | ||
+ ThreadInformationClassMax | ||
+} THREAD_INFORMATION_CLASS; | ||
+ | ||
+typedef struct _MEMORY_PRIORITY_INFORMATION | ||
+{ | ||
+ ULONG MemoryPriority; | ||
+} MEMORY_PRIORITY_INFORMATION, *PMEMORY_PRIORITY_INFORMATION; | ||
+ | ||
WINBASEAPI HRESULT WINAPI GetThreadDescription(HANDLE,PWSTR *); | ||
WINBASEAPI HRESULT WINAPI SetThreadDescription(HANDLE,PCWSTR); | ||
+WINBASEAPI BOOL WINAPI SetThreadInformation(HANDLE,THREAD_INFORMATION_CLASS,LPVOID,DWORD); | ||
|
||
#ifdef __cplusplus | ||
} | ||
|
Submodule proton-wine
updated
8 files
+101 −101 | autom4te.cache/requests | |
+1 −1 | dlls/kernel32/kernel32.spec | |
+17 −0 | dlls/kernel32/thread.c | |
+1 −1 | dlls/kernelbase/kernelbase.spec | |
+0 −1,780 | dlls/kernelbase/kernelbase.spec.orig | |
+0 −19 | dlls/kernelbase/thread.c | |
+0 −1,254 | dlls/kernelbase/thread.c.orig | |
+1 −8 | include/processthreadsapi.h |