Rebase against f4a66ad257df4605e73dfea792eec55a70a04e84.

This commit is contained in:
Alistair Leslie-Hughes 2020-10-14 08:12:47 +11:00
parent b49e874386
commit 3cea972271
11 changed files with 27 additions and 698 deletions

View File

@ -1,4 +1,4 @@
From 5a1737e74415871fd5b0646ece31f191fa74bb69 Mon Sep 17 00:00:00 2001
From 27332457e843bbef5d08dd45249956ade1258476 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 9 Jul 2019 14:13:28 +1000
Subject: [PATCH] user32: Improve GetKeyboardLayoutList
@ -11,7 +11,7 @@ not the complete list from the registry.
2 files changed, 35 insertions(+), 26 deletions(-)
diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c
index 8ff6b0a817e..ddf00cfd7b5 100644
index 7ac77141696..56009667b00 100644
--- a/dlls/user32/driver.c
+++ b/dlls/user32/driver.c
@@ -198,8 +198,6 @@ static void CDECL nulldrv_Beep(void)
@ -55,10 +55,10 @@ index 8ff6b0a817e..ddf00cfd7b5 100644
if (baselayout != 0)
{
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 1809c147cbd..fd8f26e9ee4 100644
index ce272ed73f4..9ac14b607cf 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -3791,6 +3791,40 @@ static void test_UnregisterDeviceNotification(void)
@@ -3979,6 +3979,40 @@ static void test_UnregisterDeviceNotification(void)
ok(ret == FALSE, "Unregistering NULL Device Notification returned: %d\n", ret);
}
@ -99,14 +99,14 @@ index 1809c147cbd..fd8f26e9ee4 100644
START_TEST(input)
{
char **argv;
@@ -3826,6 +3860,7 @@ START_TEST(input)
@@ -4020,6 +4054,7 @@ START_TEST(input)
test_GetRawInputBuffer();
test_RegisterRawInputDevices();
test_rawinput(argv[0]);
+ test_GetKeyboardLayoutList();
if(pGetMouseMovePointsEx)
test_GetMouseMovePointsEx();
test_GetMouseMovePointsEx(argv[0]);
--
2.28.0

View File

@ -1,44 +0,0 @@
From fa80bc605c8cffa33475fbabc12cc0b79978b11e Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Thu, 1 Oct 2020 13:24:19 +0300
Subject: [PATCH] ntdll: Zero all FLS slots instances in RtlFlsFree().
---
dlls/ntdll/thread.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index cf6bddab0b4..95511391d34 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -392,7 +392,7 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsFree( ULONG index )
{
unsigned int chunk_index, idx;
FLS_INFO_CHUNK *chunk;
- TEB_FLS_DATA *fls;
+ LIST_ENTRY *entry;
lock_fls_data();
@@ -410,10 +410,15 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsFree( ULONG index )
return STATUS_INVALID_PARAMETER;
}
- if ((fls = NtCurrentTeb()->FlsSlots) && fls->fls_data_chunks[chunk_index])
+ for (entry = fls_data.fls_list_head.Flink; entry != &fls_data.fls_list_head; entry = entry->Flink)
{
- /* FIXME: call Fls callback */
- fls->fls_data_chunks[chunk_index][idx + 1] = NULL;
+ TEB_FLS_DATA *fls = CONTAINING_RECORD(entry, TEB_FLS_DATA, fls_list_entry);
+
+ if (fls->fls_data_chunks[chunk_index])
+ {
+ /* FIXME: call Fls callback */
+ fls->fls_data_chunks[chunk_index][idx + 1] = NULL;
+ }
}
--chunk->count;
--
2.26.2

View File

@ -1,370 +0,0 @@
From c1eaab70d4cd062e8d716dcc5c3a0578ea2fa367 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Thu, 1 Oct 2020 16:58:06 +0300
Subject: [PATCH] ntdll: Call FLS callbacks.
---
dlls/kernel32/tests/fiber.c | 24 +++++++++--
dlls/kernel32/tests/loader.c | 79 ++++++++++++++++++++++++++----------
dlls/ntdll/loader.c | 8 +++-
dlls/ntdll/thread.c | 38 +++++++++++++++--
4 files changed, 118 insertions(+), 31 deletions(-)
diff --git a/dlls/kernel32/tests/fiber.c b/dlls/kernel32/tests/fiber.c
index 30f9152c39e..1b5d0d1393a 100644
--- a/dlls/kernel32/tests/fiber.c
+++ b/dlls/kernel32/tests/fiber.c
@@ -223,8 +223,11 @@ static unsigned int check_linked_list(const LIST_ENTRY *le, const LIST_ENTRY *se
return count;
}
+static unsigned int test_fls_callback_call_count;
+
static void WINAPI test_fls_callback(void *data)
{
+ ++test_fls_callback_call_count;
}
static unsigned int test_fls_chunk_size(unsigned int chunk_index)
@@ -377,8 +380,11 @@ static void test_FiberLocalStorage(void)
ok(status == STATUS_INVALID_PARAMETER, "Got unexpected status %#x.\n", status);
g_fls_data->fls_callback_chunks[j]->callbacks[index].callback = test_fls_callback;
+ test_fls_callback_call_count = 0;
status = pRtlFlsFree(fls_indices[0x10]);
ok(!status, "Got unexpected status %#x.\n", status);
+ ok(test_fls_callback_call_count == 1, "Got unexpected callback call count %u.\n",
+ test_fls_callback_call_count);
ok(!fls_data->fls_data_chunks[j][0], "Got unexpected fls_data->fls_data_chunks[%u][0] %p.\n",
j, fls_data->fls_data_chunks[j][0]);
@@ -405,7 +411,7 @@ static void test_FiberLocalStorage(void)
ok(val == (void *)0xdeadbeef, "Got unexpected val %p.\n", val);
ok(!new_fls_data, "Got unexpected teb->FlsSlots %p.\n", new_fls_data);
- status = pRtlFlsSetValue(fls_indices[1], NULL);
+ status = pRtlFlsSetValue(fls_indices[1], (void *)(ULONG_PTR)0x28);
new_fls_data = teb->FlsSlots;
ok(!status, "Got unexpected status %#x.\n", status);
ok(!!new_fls_data, "Got unexpected teb->FlsSlots %p.\n", new_fls_data);
@@ -450,11 +456,15 @@ static void test_FiberLocalStorage(void)
ok(result == WAIT_OBJECT_0, "Got unexpected result %u.\n", result);
teb->FlsSlots = NULL;
+ test_fls_callback_call_count = 0;
saved_entry = new_fls_data->fls_list_entry;
pRtlProcessFlsData(new_fls_data, 1);
ok(!teb->FlsSlots, "Got unexpected teb->FlsSlots %p.\n", teb->FlsSlots);
teb->FlsSlots = fls_data;
+ ok(test_fls_callback_call_count == 1, "Got unexpected callback call count %u.\n",
+ test_fls_callback_call_count);
+
SetEvent(test_fiberlocalstorage_done_event);
WaitForSingleObject(hthread, INFINITE);
CloseHandle(hthread);
@@ -467,7 +477,13 @@ static void test_FiberLocalStorage(void)
saved_entry.Blink);
size = HeapSize(GetProcessHeap(), 0, new_fls_data);
ok(size == sizeof(*new_fls_data), "Got unexpected size %p.\n", (void *)size);
+ test_fls_callback_call_count = 0;
+ i = test_fls_chunk_index_from_index(fls_indices[1], &index);
+ new_fls_data->fls_data_chunks[i][index + 1] = (void *)(ULONG_PTR)0x28;
pRtlProcessFlsData(new_fls_data, 2);
+ ok(!test_fls_callback_call_count, "Got unexpected callback call count %u.\n",
+ test_fls_callback_call_count);
+
if (0)
{
/* crashes on Windows. */
@@ -676,7 +692,7 @@ static void test_FiberLocalStorageCallback(PFLS_CALLBACK_FUNCTION cbfunc)
ret = pFlsFree( fls );
ok(ret, "FlsFree failed with error %u\n", GetLastError() );
- todo_wine ok( cbCount == 1, "Wrong callback count: %d\n", cbCount );
+ ok( cbCount == 1, "Wrong callback count: %d\n", cbCount );
/* Test that callback is not executed if value is NULL */
cbCount = 0;
@@ -741,14 +757,14 @@ static void test_FiberLocalStorageWithFibers(PFLS_CALLBACK_FUNCTION cbfunc)
fls_value_to_set = val1;
pDeleteFiber(fibers[1]);
ok(fiberCount == 0, "Wrong fiber count: %d\n", fiberCount);
- todo_wine ok(cbCount == 1, "Wrong callback count: %d\n", cbCount);
+ ok(cbCount == 1, "Wrong callback count: %d\n", cbCount);
fiberCount = 0;
cbCount = 0;
fls_value_to_set = val2;
pFlsFree(fls_index_to_set);
ok(fiberCount == 0, "Wrong fiber count: %d\n", fiberCount);
- todo_wine ok(cbCount == 2, "Wrong callback count: %d\n", cbCount);
+ ok(cbCount == 2, "Wrong callback count: %d\n", cbCount);
fiberCount = 0;
cbCount = 0;
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index a718c2c434f..d101104af1d 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -2319,12 +2319,34 @@ static VOID WINAPI fls_callback(PVOID lpFlsData)
InterlockedIncrement(&fls_callback_count);
}
+static LIST_ENTRY *fls_list_head;
+
+static unsigned int check_linked_list(const LIST_ENTRY *le, const LIST_ENTRY *search_entry, unsigned int *index_found)
+{
+ unsigned int count = 0;
+ LIST_ENTRY *entry;
+
+ *index_found = ~0;
+
+ for (entry = le->Flink; entry != le; entry = entry->Flink)
+ {
+ if (entry == search_entry)
+ {
+ ok(*index_found == ~0, "Duplicate list entry.\n");
+ *index_found = count;
+ }
+ ++count;
+ }
+ return count;
+}
+
static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
{
static LONG noop_thread_started;
- static DWORD fls_index = FLS_OUT_OF_INDEXES;
+ static DWORD fls_index = FLS_OUT_OF_INDEXES, fls_index2 = FLS_OUT_OF_INDEXES;
static int fls_count = 0;
static int thread_detach_count = 0;
+ static int thread_count;
DWORD ret;
ok(!inside_loader_lock, "inside_loader_lock should not be set\n");
@@ -2353,8 +2375,11 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
bret = pFlsSetValue(fls_index, (void*) 0x31415);
ok(bret, "FlsSetValue failed\n");
fls_count++;
- }
+ fls_index2 = pFlsAlloc(&fls_callback);
+ ok(fls_index2 != FLS_OUT_OF_INDEXES, "FlsAlloc returned %d\n", ret);
+ }
+ ++thread_count;
break;
case DLL_PROCESS_DETACH:
{
@@ -2424,18 +2449,12 @@ todo_wine
void* value;
SetLastError(0xdeadbeef);
value = pFlsGetValue(fls_index);
- todo_wine
- {
- ok(broken(value == (void*) 0x31415) || /* Win2k3 */
- value == NULL, "FlsGetValue returned %p, expected NULL\n", value);
- }
+ ok(broken(value == (void*) 0x31415) || /* Win2k3 */
+ value == NULL, "FlsGetValue returned %p, expected NULL\n", value);
ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %u\n", GetLastError());
- todo_wine
- {
- ok(broken(fls_callback_count == thread_detach_count) || /* Win2k3 */
- fls_callback_count == thread_detach_count + 1,
- "wrong FLS callback count %d, expected %d\n", fls_callback_count, thread_detach_count + 1);
- }
+ ok(broken(fls_callback_count == thread_detach_count) || /* Win2k3 */
+ fls_callback_count == thread_detach_count + 1,
+ "wrong FLS callback count %d, expected %d\n", fls_callback_count, thread_detach_count + 1);
}
if (pFlsFree)
{
@@ -2444,11 +2463,8 @@ todo_wine
ret = pFlsFree(fls_index);
ok(ret, "FlsFree failed with error %u\n", GetLastError());
fls_index = FLS_OUT_OF_INDEXES;
- todo_wine
- {
- ok(fls_callback_count == fls_count,
- "wrong FLS callback count %d, expected %d\n", fls_callback_count, fls_count);
- }
+ ok(fls_callback_count == fls_count,
+ "wrong FLS callback count %d, expected %d\n", fls_callback_count, fls_count);
}
ok(attached_thread_count >= 2, "attached thread count should be >= 2\n");
@@ -2612,6 +2628,8 @@ todo_wine
case DLL_THREAD_ATTACH:
trace("dll: %p, DLL_THREAD_ATTACH, %p\n", hinst, param);
+ ++thread_count;
+
ret = pRtlDllShutdownInProgress();
ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret);
@@ -2639,6 +2657,7 @@ todo_wine
break;
case DLL_THREAD_DETACH:
trace("dll: %p, DLL_THREAD_DETACH, %p\n", hinst, param);
+ --thread_count;
thread_detach_count++;
ret = pRtlDllShutdownInProgress();
@@ -2657,15 +2676,25 @@ todo_wine
*/
if (pFlsGetValue && fls_index != FLS_OUT_OF_INDEXES)
{
+ unsigned int index, count;
void* value;
+ BOOL bret;
+
SetLastError(0xdeadbeef);
value = pFlsGetValue(fls_index);
- todo_wine
+ ok(broken(value == (void*) 0x31415) || /* Win2k3 */
+ !value, "FlsGetValue returned %p, expected NULL\n", value);
+ ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %u\n", GetLastError());
+
+ bret = pFlsSetValue(fls_index2, (void*) 0x31415);
+ ok(bret, "FlsSetValue failed\n");
+
+ if (fls_list_head)
{
- ok(broken(value == (void*) 0x31415) || /* Win2k3 */
- !value, "FlsGetValue returned %p, expected NULL\n", value);
+ count = check_linked_list(fls_list_head, &NtCurrentTeb()->FlsSlots->fls_list_entry, &index);
+ ok(count <= thread_count, "Got unexpected count %u, thread_count %u.\n", count, thread_count);
+ ok(index == ~0, "Got unexpected index %u.\n", index);
}
- ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %u\n", GetLastError());
}
break;
@@ -2690,6 +2719,12 @@ static void child_process(const char *dll_name, DWORD target_offset)
trace("phase %d: writing %p at %#x\n", test_dll_phase, dll_entry_point, target_offset);
+ if (pFlsAlloc)
+ {
+ fls_list_head = NtCurrentTeb()->Peb->FlsListHead.Flink ? &NtCurrentTeb()->Peb->FlsListHead
+ : NtCurrentTeb()->FlsSlots->fls_list_entry.Flink;
+ }
+
SetLastError(0xdeadbeef);
mutex = CreateMutexW(NULL, FALSE, NULL);
ok(mutex != 0, "CreateMutex error %d\n", GetLastError());
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 38dfc7f7233..cfa07140d7f 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3354,6 +3354,10 @@ fail:
void WINAPI LdrShutdownProcess(void)
{
TRACE("()\n");
+
+ if (!process_detaching)
+ RtlProcessFlsData( NtCurrentTeb()->FlsSlots, 1 );
+
process_detaching = TRUE;
process_detach();
}
@@ -3388,6 +3392,8 @@ void WINAPI LdrShutdownThread(void)
/* don't do any detach calls if process is exiting */
if (process_detaching) return;
+ RtlProcessFlsData( NtCurrentTeb()->FlsSlots, 1 );
+
RtlEnterCriticalSection( &loader_section );
wm = get_modref( NtCurrentTeb()->Peb->ImageBaseAddress );
@@ -3414,7 +3420,7 @@ void WINAPI LdrShutdownThread(void)
for (i = 0; i < tls_module_count; i++) RtlFreeHeap( GetProcessHeap(), 0, pointers[i] );
RtlFreeHeap( GetProcessHeap(), 0, pointers );
}
- RtlProcessFlsData( NtCurrentTeb()->FlsSlots, 3 );
+ RtlProcessFlsData( NtCurrentTeb()->FlsSlots, 2 );
NtCurrentTeb()->FlsSlots = NULL;
RtlFreeHeap( GetProcessHeap(), 0, NtCurrentTeb()->TlsExpansionSlots );
NtCurrentTeb()->TlsExpansionSlots = NULL;
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 95511391d34..2926d6173bf 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -390,6 +390,7 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsAlloc( PFLS_CALLBACK_FUNCTION callback,
*/
NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsFree( ULONG index )
{
+ PFLS_CALLBACK_FUNCTION callback;
unsigned int chunk_index, idx;
FLS_INFO_CHUNK *chunk;
LIST_ENTRY *entry;
@@ -404,7 +405,7 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsFree( ULONG index )
chunk_index = fls_chunk_index_from_index( index, &idx );
if (!(chunk = fls_data.fls_callback_chunks[chunk_index])
- || !chunk->callbacks[idx].callback)
+ || !(callback = chunk->callbacks[idx].callback))
{
unlock_fls_data();
return STATUS_INVALID_PARAMETER;
@@ -414,9 +415,15 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsFree( ULONG index )
{
TEB_FLS_DATA *fls = CONTAINING_RECORD(entry, TEB_FLS_DATA, fls_list_entry);
- if (fls->fls_data_chunks[chunk_index])
+ if (fls->fls_data_chunks[chunk_index] && fls->fls_data_chunks[chunk_index][idx + 1])
{
- /* FIXME: call Fls callback */
+ if (callback != (void *)~(ULONG_PTR)0)
+ {
+ TRACE_(relay)("Calling FLS callback %p, arg %p.\n", callback,
+ fls->fls_data_chunks[chunk_index][idx + 1]);
+
+ callback( fls->fls_data_chunks[chunk_index][idx + 1] );
+ }
fls->fls_data_chunks[chunk_index][idx + 1] = NULL;
}
}
@@ -481,7 +488,7 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsGetValue( ULONG index, void **data )
void WINAPI DECLSPEC_HOTPATCH RtlProcessFlsData( void *teb_fls_data, ULONG flags )
{
TEB_FLS_DATA *fls = teb_fls_data;
- unsigned int i;
+ unsigned int i, index;
TRACE_(thread)( "teb_fls_data %p, flags %#x.\n", teb_fls_data, flags );
@@ -494,6 +501,29 @@ void WINAPI DECLSPEC_HOTPATCH RtlProcessFlsData( void *teb_fls_data, ULONG flags
if (flags & 1)
{
lock_fls_data();
+ for (i = 0; i < ARRAY_SIZE(fls->fls_data_chunks); ++i)
+ {
+ if (!fls->fls_data_chunks[i] || !fls_data.fls_callback_chunks[i]
+ || !fls_data.fls_callback_chunks[i]->count)
+ continue;
+
+ for (index = 0; index < fls_chunk_size( i ); ++index)
+ {
+ PFLS_CALLBACK_FUNCTION callback = fls_data.fls_callback_chunks[i]->callbacks[index].callback;
+
+ if (!fls->fls_data_chunks[i][index + 1])
+ continue;
+
+ if (callback && callback != (void *)~(ULONG_PTR)0)
+ {
+ TRACE_(relay)("Calling FLS callback %p, arg %p.\n", callback,
+ fls->fls_data_chunks[i][index + 1]);
+
+ callback( fls->fls_data_chunks[i][index + 1] );
+ }
+ fls->fls_data_chunks[i][index + 1] = NULL;
+ }
+ }
/* Not using RemoveEntryList() as Windows does not zero list entry here. */
fls->fls_list_entry.Flink->Blink = fls->fls_list_entry.Blink;
fls->fls_list_entry.Blink->Flink = fls->fls_list_entry.Flink;
--
2.26.2

View File

@ -1,2 +0,0 @@
Fixes: [49012] Application build with .NET CoreRT crashes due to FLS callbacks not being called
Disabled: False

View File

@ -1,4 +1,4 @@
From c27588bc3f2e5afd8c71f727023bbd167d1195e9 Mon Sep 17 00:00:00 2001
From f0c0ce75dc3ad0f1ea033bab64ed22cec0d5ca93 Mon Sep 17 00:00:00 2001
From: Alex Henrie <alexhenrie24@gmail.com>
Date: Tue, 29 Dec 2015 00:48:02 -0700
Subject: [PATCH] mountmgr.sys: Do a device check before returning a default
@ -10,20 +10,20 @@ Fixes https://bugs.winehq.org/show_bug.cgi?id=39793
1 file changed, 24 insertions(+)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index 7c34f8b3db7..dd23b2baa21 100644
index 37ba33840b5..c8af6856043 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -26,6 +26,9 @@
#include <stdarg.h>
@@ -27,6 +27,9 @@
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
+#ifdef HAVE_TERMIOS_H
+# include <termios.h>
+#endif
#include <sys/time.h>
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
@@ -1253,6 +1256,27 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p
@@ -1970,6 +1973,27 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p
sprintfW( dos_name, dos_name_format, n );
@ -52,5 +52,5 @@ index 7c34f8b3db7..dd23b2baa21 100644
unlink( dosdevices_path );
if (symlink( unix_path, dosdevices_path ) != 0)
--
2.17.1
2.28.0

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "f7d815089580cebe2682683345272858def6358c"
echo "f4a66ad257df4605e73dfea792eec55a70a04e84"
}
# Show version information
@ -163,7 +163,6 @@ patch_enable_all ()
enable_ntdll_DOS_Attributes="$1"
enable_ntdll_Dealloc_Thread_Stack="$1"
enable_ntdll_Exception="$1"
enable_ntdll_FLS_Callbacks="$1"
enable_ntdll_FileDispositionInformation="$1"
enable_ntdll_FileFsFullSizeInformation="$1"
enable_ntdll_Fix_Alignment="$1"
@ -248,7 +247,6 @@ patch_enable_all ()
enable_user32_Dialog_Paint_Event="$1"
enable_user32_DrawTextExW="$1"
enable_user32_FlashWindowEx="$1"
enable_user32_GetMouseMovePointsEx="$1"
enable_user32_GetSystemMetrics="$1"
enable_user32_Implement_CascadeWindows="$1"
enable_user32_InternalGetWindowIcon="$1"
@ -580,9 +578,6 @@ patch_enable ()
ntdll-Exception)
enable_ntdll_Exception="$2"
;;
ntdll-FLS_Callbacks)
enable_ntdll_FLS_Callbacks="$2"
;;
ntdll-FileDispositionInformation)
enable_ntdll_FileDispositionInformation="$2"
;;
@ -835,9 +830,6 @@ patch_enable ()
user32-FlashWindowEx)
enable_user32_FlashWindowEx="$2"
;;
user32-GetMouseMovePointsEx)
enable_user32_GetMouseMovePointsEx="$2"
;;
user32-GetSystemMetrics)
enable_user32_GetSystemMetrics="$2"
;;
@ -2982,19 +2974,6 @@ if test "$enable_ntdll_Exception" -eq 1; then
patch_apply ntdll-Exception/0002-ntdll-OutputDebugString-should-throw-the-exception-a.patch
fi
# Patchset ntdll-FLS_Callbacks
# |
# | This patchset fixes the following Wine bugs:
# | * [#49012] Application build with .NET CoreRT crashes due to FLS callbacks not being called
# |
# | Modified files:
# | * dlls/kernel32/tests/fiber.c, dlls/kernel32/tests/loader.c, dlls/ntdll/loader.c, dlls/ntdll/thread.c
# |
if test "$enable_ntdll_FLS_Callbacks" -eq 1; then
patch_apply ntdll-FLS_Callbacks/0001-ntdll-Zero-all-FLS-slots-instances-in-RtlFlsFree.patch
patch_apply ntdll-FLS_Callbacks/0002-ntdll-Call-FLS-callbacks.patch
fi
# Patchset ntdll-FileFsFullSizeInformation
# |
# | Modified files:
@ -4060,18 +4039,6 @@ if test "$enable_user32_FlashWindowEx" -eq 1; then
patch_apply user32-FlashWindowEx/0001-user32-Improve-FlashWindowEx-message-and-return-valu.patch
fi
# Patchset user32-GetMouseMovePointsEx
# |
# | This patchset fixes the following Wine bugs:
# | * [#36873] Semi-stub GetMouseMovePointsEx
# |
# | Modified files:
# | * dlls/user32/input.c
# |
if test "$enable_user32_GetMouseMovePointsEx" -eq 1; then
patch_apply user32-GetMouseMovePointsEx/0001-user32-Partially-implement-GetMouseMovePointsEx.patch
fi
# Patchset user32-GetSystemMetrics
# |
# | This patchset fixes the following Wine bugs:
@ -5083,12 +5050,11 @@ fi
# | * [#48684] BlazBlue: Calamity Trigger requires for xactengine 3.3 interface.
# |
# | Modified files:
# | * configure.ac, dlls/x3daudio1_7/Makefile.in, dlls/xactengine3_7/tests/Makefile.in, dlls/xactengine3_7/tests/globals.xgs,
# | * dlls/x3daudio1_7/Makefile.in, dlls/xactengine3_7/tests/Makefile.in, dlls/xactengine3_7/tests/globals.xgs,
# | dlls/xactengine3_7/tests/rsrc.rc, dlls/xactengine3_7/tests/xact3.c
# |
if test "$enable_xactengine_initial" -eq 1; then
patch_apply xactengine-initial/0001-x3daudio1_7-Create-import-library.patch
patch_apply xactengine-initial/0002-xactengine3_7-Initial-IXACT3Engine-tests.patch
patch_apply xactengine-initial/0003-xactengine3_7-tests-Add-Global-settings-test.patch
fi

View File

@ -1,4 +1,4 @@
From f20e406fad78eeebea4e07407e6b05e069c8475f Mon Sep 17 00:00:00 2001
From be8f547f53a1f8d35d9680a8cb2f0cfa808568b8 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 12 Mar 2015 00:44:25 +0100
Subject: [PATCH] server: Introduce a helper function to update the
@ -9,10 +9,10 @@ Subject: [PATCH] server: Introduce a helper function to update the
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git a/server/queue.c b/server/queue.c
index a65eab38bdc..b8943bc4b61 100644
index 7e7e6fbdf29..344e4298a56 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1295,9 +1295,9 @@ static void set_input_key_state( unsigned char *keystate, unsigned char key, int
@@ -1300,9 +1300,9 @@ static void set_input_key_state( unsigned char *keystate, unsigned char key, int
else keystate[key] &= ~0x80;
}
@ -25,7 +25,7 @@ index a65eab38bdc..b8943bc4b61 100644
{
unsigned char key;
int down = 0;
@@ -1366,21 +1366,27 @@ static void update_desktop_mouse_state( struct desktop *desktop, unsigned int fl
@@ -1371,21 +1371,27 @@ static void update_desktop_mouse_state( struct desktop *desktop, unsigned int fl
if (flags & MOUSEEVENTF_MOVE)
update_desktop_cursor_pos( desktop, x, y );
if (flags & MOUSEEVENTF_LEFTDOWN)
@ -61,7 +61,7 @@ index a65eab38bdc..b8943bc4b61 100644
}
/* release the hardware message currently being processed by the given thread */
@@ -1408,7 +1414,7 @@ static void release_hardware_message( struct msg_queue *queue, unsigned int hw_i
@@ -1413,7 +1419,7 @@ static void release_hardware_message( struct msg_queue *queue, unsigned int hw_i
}
if (clr_bit) clear_queue_bits( queue, clr_bit );
@ -70,8 +70,8 @@ index a65eab38bdc..b8943bc4b61 100644
list_remove( &msg->entry );
free_message( msg );
}
@@ -1526,7 +1532,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
struct thread_input *input;
@@ -1542,7 +1548,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
struct hardware_msg_data *msg_data = msg->data;
unsigned int msg_code;
- update_input_key_state( desktop, desktop->keystate, msg->msg, msg->wparam );
@ -79,7 +79,7 @@ index a65eab38bdc..b8943bc4b61 100644
last_input_time = get_tick_count();
if (msg->msg != WM_MOUSEMOVE) always_queue = 1;
@@ -1561,7 +1567,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
@@ -1581,7 +1587,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
win = find_hardware_message_window( desktop, input, msg, &msg_code, &thread );
if (!win || !thread)
{
@ -88,7 +88,7 @@ index a65eab38bdc..b8943bc4b61 100644
free_message( msg );
return;
}
@@ -1899,7 +1905,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
@@ -1919,7 +1925,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
if ((device = current->process->rawinput_kbd) && (device->flags & RIDEV_NOLEGACY))
{
@ -97,7 +97,7 @@ index a65eab38bdc..b8943bc4b61 100644
return 0;
}
@@ -2028,7 +2034,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
@@ -2048,7 +2054,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
if (!win || !win_thread)
{
/* no window at all, remove it */
@ -106,7 +106,7 @@ index a65eab38bdc..b8943bc4b61 100644
list_remove( &msg->entry );
free_message( msg );
continue;
@@ -2044,7 +2050,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
@@ -2064,7 +2070,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
else
{
/* for another thread input, drop it */
@ -116,5 +116,5 @@ index a65eab38bdc..b8943bc4b61 100644
free_message( msg );
}
--
2.27.0
2.28.0

View File

@ -1,74 +0,0 @@
From 9df9c77fe5f5fef1e22cf46e780de5eca8ffd274 Mon Sep 17 00:00:00 2001
From: "Ryan S. Northrup (RyNo)" <northrup@yellowapple.us>
Date: Wed, 1 Apr 2020 19:59:53 -0700
Subject: [PATCH v2] user32: Semi-stub GetMouseMovePointsEx
---
dlls/user32/input.c | 43 +++++++++++++++++++++++++++++++++++++++----
1 file changed, 39 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 0325e2ce3d..bf029093bf 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -1268,7 +1268,12 @@ TrackMouseEvent (TRACKMOUSEEVENT *ptme)
* Success: count of point set in the buffer
* Failure: -1
*/
-int WINAPI GetMouseMovePointsEx(UINT size, LPMOUSEMOVEPOINT ptin, LPMOUSEMOVEPOINT ptout, int count, DWORD res) {
+int WINAPI GetMouseMovePointsEx(UINT size, LPMOUSEMOVEPOINT ptin, LPMOUSEMOVEPOINT ptout, int count, DWORD res)
+{
+ POINT pos;
+ static BOOL once;
+ static INT last_x = 0;
+ static INT last_y = 0;
if((size != sizeof(MOUSEMOVEPOINT)) || (count < 0) || (count > 64)) {
SetLastError(ERROR_INVALID_PARAMETER);
@@ -1280,10 +1285,40 @@ int WINAPI GetMouseMovePointsEx(UINT size, LPMOUSEMOVEPOINT ptin, LPMOUSEMOVEPOI
return -1;
}
- FIXME("(%d %p %p %d %d) stub\n", size, ptin, ptout, count, res);
+ if (!once++)
+ FIXME("(%d %p %p %d %d) semi-stub\n", size, ptin, ptout, count, res);
+ else
+ TRACE("(%d %p %p %d %d) semi-stub\n", size, ptin, ptout, count, res);
+
+ TRACE(" ptin: %d %d\n", ptin->x, ptin->y);
+
+ if (res == GMMP_USE_HIGH_RESOLUTION_POINTS)
+ {
+ WARN("GMMP_USE_HIGH_RESOLUTION_POINTS not supported");
+ SetLastError(ERROR_POINT_NOT_FOUND);
+ return -1;
+ }
- SetLastError(ERROR_POINT_NOT_FOUND);
- return -1;
+ GetCursorPos(&pos);
+
+ ptout[0].x = pos.x;
+ ptout[0].y = pos.y;
+ ptout[0].time = GetTickCount();
+ ptout[0].dwExtraInfo = 0;
+ TRACE(" ptout[0]: %d %d\n", pos.x, pos.y);
+
+ if (count > 1) {
+ ptout[1].x = last_x;
+ ptout[1].y = last_y;
+ ptout[1].time = GetTickCount();
+ ptout[1].dwExtraInfo = 0;
+ TRACE(" ptout[1]: %d %d\n", last_x, last_y);
+ }
+
+ last_x = pos.x;
+ last_y = pos.y;
+
+ return count > 1 ? 2 : 1;
}
/***********************************************************************
--
2.24.1

View File

@ -1 +0,0 @@
Fixes: [36873] Semi-stub GetMouseMovePointsEx

View File

@ -1,146 +0,0 @@
From baccae5a9e11bdf89cbbc55b5b4b00fa12aec9fa Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 14 Jan 2020 13:42:48 +1100
Subject: [PATCH] xactengine3_7: Initial IXACT3Engine tests
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
configure.ac | 1 +
dlls/xactengine3_7/tests/Makefile.in | 5 ++
dlls/xactengine3_7/tests/xact3.c | 100 +++++++++++++++++++++++++++
3 files changed, 106 insertions(+)
create mode 100644 dlls/xactengine3_7/tests/Makefile.in
create mode 100644 dlls/xactengine3_7/tests/xact3.c
diff --git a/configure.ac b/configure.ac
index 51205d1451b..3f1937f6e07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3916,6 +3916,7 @@ WINE_CONFIG_MAKEFILE(dlls/xactengine3_4)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_5)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_6)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_7)
+WINE_CONFIG_MAKEFILE(dlls/xactengine3_7/tests)
WINE_CONFIG_MAKEFILE(dlls/xapofx1_1)
WINE_CONFIG_MAKEFILE(dlls/xapofx1_2)
WINE_CONFIG_MAKEFILE(dlls/xapofx1_3)
diff --git a/dlls/xactengine3_7/tests/Makefile.in b/dlls/xactengine3_7/tests/Makefile.in
new file mode 100644
index 00000000000..c32b2562546
--- /dev/null
+++ b/dlls/xactengine3_7/tests/Makefile.in
@@ -0,0 +1,5 @@
+TESTDLL = xactengine3_7.dll
+IMPORTS = ole32
+
+C_SRCS = \
+ xact3.c
diff --git a/dlls/xactengine3_7/tests/xact3.c b/dlls/xactengine3_7/tests/xact3.c
new file mode 100644
index 00000000000..9b0d3defb09
--- /dev/null
+++ b/dlls/xactengine3_7/tests/xact3.c
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2020 Alistair Leslie-Hughes
+ *
+ * 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 <windows.h>
+#include <math.h>
+#include <limits.h>
+#include <float.h>
+
+#define COBJMACROS
+#include "wine/test.h"
+
+#include "x3daudio.h"
+
+#include "initguid.h"
+#include "xact3.h"
+
+DEFINE_GUID(IID_IXACT3Engine30, 0x9e33f661, 0x2d07, 0x43ec, 0x97, 0x04, 0xbb, 0xcb, 0x71, 0xa5, 0x49, 0x72);
+DEFINE_GUID(IID_IXACT3Engine31, 0xe72c1b9a, 0xd717, 0x41c0, 0x81, 0xa6, 0x50, 0xeb, 0x56, 0xe8, 0x06, 0x49);
+
+DEFINE_GUID(CLSID_XACTEngine30, 0x3b80ee2a, 0xb0f5, 0x4780, 0x9e, 0x30, 0x90, 0xcb, 0x39, 0x68, 0x5b, 0x03);
+DEFINE_GUID(CLSID_XACTEngine31, 0x962f5027, 0x99be, 0x4692, 0xa4, 0x68, 0x85, 0x80, 0x2c, 0xf8, 0xde, 0x61);
+DEFINE_GUID(CLSID_XACTEngine32, 0xd3332f02, 0x3dd0, 0x4de9, 0x9a, 0xec, 0x20, 0xd8, 0x5c, 0x41, 0x11, 0xb6);
+DEFINE_GUID(CLSID_XACTEngine33, 0x94c1affa, 0x66e7, 0x4961, 0x95, 0x21, 0xcf, 0xde, 0xf3, 0x12, 0x8d, 0x4f);
+DEFINE_GUID(CLSID_XACTEngine34, 0x0977d092, 0x2d95, 0x4e43, 0x8d, 0x42, 0x9d, 0xdc, 0xc2, 0x54, 0x5e, 0xd5);
+DEFINE_GUID(CLSID_XACTEngine35, 0x074b110f, 0x7f58, 0x4743, 0xae, 0xa5, 0x12, 0xf1, 0x5b, 0x50, 0x74, 0xed);
+DEFINE_GUID(CLSID_XACTEngine36, 0x248d8a3b, 0x6256, 0x44d3, 0xa0, 0x18, 0x2a, 0xc9, 0x6c, 0x45, 0x9f, 0x47);
+
+struct xact_interfaces
+{
+ REFGUID clsid;
+ REFIID iid;
+ HRESULT expected;
+} xact_interfaces[] =
+{
+ {&CLSID_XACTEngine30, &IID_IXACT3Engine30, S_OK },
+ {&CLSID_XACTEngine30, &IID_IXACT3Engine31, E_NOINTERFACE},
+ {&CLSID_XACTEngine30, &IID_IXACT3Engine, E_NOINTERFACE },
+
+ /* Version 3.1 to 3.4 use the same inteface */
+ {&CLSID_XACTEngine31, &IID_IXACT3Engine31, S_OK },
+ {&CLSID_XACTEngine32, &IID_IXACT3Engine31, S_OK },
+ {&CLSID_XACTEngine33, &IID_IXACT3Engine31, S_OK },
+ {&CLSID_XACTEngine34, &IID_IXACT3Engine31, S_OK },
+
+ /* Version 3.5 to 3.7 use the same inteface */
+ {&CLSID_XACTEngine35, &IID_IXACT3Engine31, E_NOINTERFACE },
+ {&CLSID_XACTEngine35, &IID_IXACT3Engine, S_OK },
+
+ {&CLSID_XACTEngine36, &IID_IXACT3Engine31, E_NOINTERFACE },
+ {&CLSID_XACTEngine36, &IID_IXACT3Engine, S_OK },
+
+ {&CLSID_XACTEngine, &IID_IXACT3Engine31, E_NOINTERFACE },
+ {&CLSID_XACTEngine, &IID_IXACT3Engine, S_OK },
+ {&CLSID_XACTEngine, &IID_IUnknown, S_OK },
+};
+
+static void test_interfaces(void)
+{
+ IUnknown *unk;
+ HRESULT hr;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(xact_interfaces); i++)
+ {
+ hr = CoCreateInstance(xact_interfaces[i].clsid, NULL, CLSCTX_INPROC_SERVER,
+ xact_interfaces[i].iid, (void**)&unk);
+ if (hr == REGDB_E_CLASSNOTREG)
+ {
+ trace("%d %s not registered. Skipping\n", i, wine_dbgstr_guid(xact_interfaces[i].clsid) );
+ continue;
+ }
+ ok(hr == xact_interfaces[i].expected, "%d, Unexpected value 0x%08x\n", i, hr);
+ if (hr == S_OK)
+ IUnknown_Release(unk);
+ }
+}
+
+START_TEST(xact3)
+{
+ CoInitialize(NULL);
+
+ test_interfaces();
+
+ CoUninitialize();
+}
--
2.28.0

View File

@ -1 +1 @@
412db7789379549c4f821acb11c92f7aabab71c9
f4a66ad257df4605e73dfea792eec55a70a04e84