Compare commits

...

18 Commits
v8.2 ... v8.4

Author SHA1 Message Date
Alistair Leslie-Hughes
3a47cfd8a5 Release v8.4 2023-03-18 14:56:06 +11:00
Alistair Leslie-Hughes
fab4cd0932 Rebase against 446da60e78beb321d776b48cdee6f764c81b924b. 2023-03-17 16:05:30 +11:00
Alistair Leslie-Hughes
2ac5cdbf37 Rebase against 7db5431699037d03f26c065a58c400991210c7f7. 2023-03-15 15:06:52 +11:00
Alistair Leslie-Hughes
e3a3dcd0ce Rebase against a8fa80cfb4a1819be12ece459753bc07d4ea8be6. 2023-03-10 16:29:07 +11:00
Alistair Leslie-Hughes
aa36637563 Rebase against 50f5f9af1c27c4380a7489596d20d8048f003365. 2023-03-08 09:45:55 +11:00
Alistair Leslie-Hughes
70958b46d0 Rebase against 45e83cc8c28cece236f1537958f6e21b48193f2c. 2023-03-07 11:24:26 +11:00
Alistair Leslie-Hughes
575f6f67cc Release v8.3 2023-03-05 09:42:43 +11:00
Alistair Leslie-Hughes
9929ac3038 Rebase against e796002ee61bf5dfb2718e8f4fb8fa928ccdc236. 2023-03-04 09:11:01 +11:00
Alistair Leslie-Hughes
cd22a0fb15 Rebase against 10765f2956d6f9fc2d16bb2bec476b12a31786f6. 2023-03-03 14:57:42 +11:00
Alistair Leslie-Hughes
f7b671178c Added vcomp_for_dynamic_init_i8 patchset 2023-03-01 12:48:37 +11:00
Alistair Leslie-Hughes
dc43a031be Rebase against 56db5b0bf1aa6df5edbedbec03e0a1db39d6639b. 2023-03-01 11:25:57 +11:00
Alistair Leslie-Hughes
7b0d44f887 Rebase against 3fb2a5d55e948670222170075f0054a2aabf8d7e. 2023-02-25 19:56:00 +11:00
Alistair Leslie-Hughes
0611b4d10c Rebase against 4d0d7e49b9b33bba023ba67add84486ba4cc8efd. 2023-02-24 10:23:41 +11:00
Zebediah Figura
b9421d8376 ntdll-Heap_Improvements: Remove patch set.
Obviated by the low-fragmentation heap work now upstream.
2023-02-23 11:57:01 -06:00
Zebediah Figura
a11194038c Rebase against 15b176b4f4945d7abfb4adbddc7f140ba1765855. 2023-02-22 15:34:37 -06:00
Zebediah Figura
d8293544f4 patchinstall.py: Pass the wine tree to the "patch" backend. 2023-02-22 15:22:40 -06:00
Alistair Leslie-Hughes
bf7a234e0c Rebase against 2436964d5678956a362a9bef34625885442740f6. 2023-02-21 09:53:38 +11:00
Zebediah Figura
1f76f7faec patchinstall.py: Allow specifying DESTDIR= as an argument. 2023-02-18 23:52:33 -06:00
35 changed files with 573 additions and 1093 deletions

View File

@@ -1,18 +1,17 @@
From e7104770d4b57539d5b64a67212504910692e920 Mon Sep 17 00:00:00 2001
From 01097ee44ab6835a4c139261c188ae6535bfb311 Mon Sep 17 00:00:00 2001
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Date: Tue, 30 Apr 2019 09:20:54 +1000
Subject: [PATCH] dinput: Allow empty Joystick mappings.
---
dlls/dinput/device.c | 77 ++++++++++++++++++++++++++++++-------
dlls/dinput/tests/device8.c | 50 ++++++++++++++++++++++++
2 files changed, 113 insertions(+), 14 deletions(-)
dlls/dinput/device.c | 77 ++++++++++++++++++++++++++++++++++++--------
1 file changed, 63 insertions(+), 14 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index 6cc190ee7fb..2fd9329aa68 100644
index c001d1ef29a..d1ff222a653 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -364,12 +364,26 @@ static DWORD semantic_to_obj_id( struct dinput_device *This, DWORD dwSemantic )
@@ -341,12 +341,26 @@ static DWORD semantic_to_obj_id( struct dinput_device *This, DWORD dwSemantic )
return type | (0x0000ff00 & (instance << 8));
}
@@ -40,7 +39,7 @@ index 6cc190ee7fb..2fd9329aa68 100644
{
static const WCHAR *subkey = L"Software\\Wine\\DirectInput\\Mappings\\%s\\%s\\%s";
HKEY hkey;
@@ -380,8 +394,11 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
@@ -357,8 +371,11 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
swprintf( keyname, len, subkey, username, device, guid );
/* The key used is HKCU\Software\Wine\DirectInput\Mappings\[username]\[device]\[mapping_guid] */
@@ -54,7 +53,7 @@ index 6cc190ee7fb..2fd9329aa68 100644
free( keyname );
@@ -401,7 +418,9 @@ static HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORM
@@ -378,7 +395,9 @@ static HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORM
if (StringFromCLSID(&lpdiaf->guidActionMap, &guid_str) != S_OK)
return DI_SETTINGSNOTSAVED;
@@ -65,7 +64,7 @@ index 6cc190ee7fb..2fd9329aa68 100644
if (!hkey)
{
@@ -436,7 +455,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
@@ -413,7 +432,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
HKEY hkey;
WCHAR *guid_str;
DIDEVICEINSTANCEW didev;
@@ -74,7 +73,7 @@ index 6cc190ee7fb..2fd9329aa68 100644
didev.dwSize = sizeof(didev);
IDirectInputDevice8_GetDeviceInfo(&This->IDirectInputDevice8W_iface, &didev);
@@ -444,7 +463,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
@@ -421,7 +440,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
if (StringFromCLSID(&lpdiaf->guidActionMap, &guid_str) != S_OK)
return FALSE;
@@ -83,7 +82,7 @@ index 6cc190ee7fb..2fd9329aa68 100644
if (!hkey)
{
@@ -464,15 +483,20 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
@@ -441,15 +460,20 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
{
lpdiaf->rgoAction[i].dwObjID = id;
lpdiaf->rgoAction[i].guidInstance = didev.guidInstance;
@@ -107,7 +106,7 @@ index 6cc190ee7fb..2fd9329aa68 100644
}
static BOOL set_app_data( struct dinput_device *dev, int offset, UINT_PTR app_data )
@@ -1935,13 +1959,18 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
@@ -1896,13 +1920,18 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
load_success = load_mapping_settings( impl, format, username_buf );
}
@@ -130,7 +129,7 @@ index 6cc190ee7fb..2fd9329aa68 100644
genre = format->rgoAction[i].dwSemantic & DIGENRE_ANY;
if (devMask == genre || (devMask == DIGENRE_ANY && genre != DIMOUSE_MASK && genre != DIKEYBOARD_MASK))
{
@@ -1973,6 +2002,14 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
@@ -1934,6 +1963,14 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
}
}
@@ -145,7 +144,7 @@ index 6cc190ee7fb..2fd9329aa68 100644
if (!has_actions) return DI_NOEFFECT;
if (flags & (DIDBAM_DEFAULT|DIDBAM_PRESERVE|DIDBAM_INITIALIZE|DIDBAM_HWDEFAULTS))
FIXME( "Unimplemented flags %#lx\n", flags );
@@ -1990,6 +2027,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
@@ -1951,6 +1988,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
DIPROPSTRING dps;
WCHAR username_buf[MAX_PATH];
DWORD username_len = MAX_PATH;
@@ -153,7 +152,7 @@ index 6cc190ee7fb..2fd9329aa68 100644
int i, action = 0, num_actions = 0;
unsigned int offset = 0;
const DIDATAFORMAT *df;
@@ -2022,12 +2060,23 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
@@ -1983,12 +2021,23 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
data_format.dwFlags = DIDF_RELAXIS;
data_format.dwDataSize = format->dwDataSize;
@@ -178,81 +177,6 @@ index 6cc190ee7fb..2fd9329aa68 100644
/* Construct the dataformat and actionmap */
obj_df = malloc( sizeof(DIOBJECTDATAFORMAT) * num_actions );
diff --git a/dlls/dinput/tests/device8.c b/dlls/dinput/tests/device8.c
index 2586736cb1d..e2be36ad7d3 100644
--- a/dlls/dinput/tests/device8.c
+++ b/dlls/dinput/tests/device8.c
@@ -48,6 +48,8 @@ struct enum_data {
/* Dummy GUID */
static const GUID ACTION_MAPPING_GUID = { 0x1, 0x2, 0x3, { 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb } };
+static const GUID NULL_GUID = { 0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } };
+
enum {
DITEST_AXIS,
DITEST_BUTTON,
@@ -472,6 +474,17 @@ static void test_action_mapping(void)
hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0);
ok (hr == DI_NOEFFECT, "SetActionMap should have no effect with no actions to map hr=%#lx\n", hr);
+ /* Test that after changing actionformat SetActionMap has effect and that second
+ * SetActionMap call with same empty actionformat has no effect */
+ af.dwDataSize = 4 * 1;
+ af.dwNumActions = 1;
+
+ hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0);
+ ok (hr != DI_NOEFFECT, "SetActionMap should have effect as actionformat has changed hr=%08x\n", hr);
+
+ hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0);
+ ok (hr == DI_NOEFFECT, "SetActionMap should have no effect with no actions to map hr=%08x\n", hr);
+
af.dwDataSize = 4 * ARRAY_SIZE(actionMapping);
af.dwNumActions = ARRAY_SIZE(actionMapping);
@@ -663,6 +676,43 @@ static void test_save_settings(void)
"Mapped incorrectly expected: 0x%#lx got: 0x%#lx\n", other_results[1], af.rgoAction[1].dwObjID);
ok (IsEqualGUID(&GUID_SysKeyboard, &af.rgoAction[1].guidInstance), "Action should be mapped to keyboard\n");
+ /* Save and load empty mapping */
+ af.rgoAction[0].dwObjID = 0;
+ af.rgoAction[0].dwHow = 0;
+ memset(&af.rgoAction[0].guidInstance, 0, sizeof(GUID));
+ af.rgoAction[1].dwObjID = 0;
+ af.rgoAction[1].dwHow = 0;
+ memset(&af.rgoAction[1].guidInstance, 0, sizeof(GUID));
+
+ hr = IDirectInputDevice8_SetActionMap(pKey, &af, NULL, DIDSAM_FORCESAVE);
+ ok (SUCCEEDED(hr), "SetActionMap failed hr=%08x\n", hr);
+
+ if (hr == DI_SETTINGSNOTSAVED)
+ {
+ skip ("Can't test saving settings if SetActionMap returns DI_SETTINGSNOTSAVED\n");
+ return;
+ }
+
+ af.rgoAction[0].dwObjID = other_results[0];
+ af.rgoAction[0].dwHow = DIAH_USERCONFIG;
+ af.rgoAction[0].guidInstance = GUID_SysKeyboard;
+ af.rgoAction[1].dwObjID = other_results[1];
+ af.rgoAction[1].dwHow = DIAH_USERCONFIG;
+ af.rgoAction[1].guidInstance = GUID_SysKeyboard;
+
+ hr = IDirectInputDevice8_BuildActionMap(pKey, &af, NULL, 0);
+ ok (SUCCEEDED(hr), "BuildActionMap failed hr=%08x\n", hr);
+
+ ok (other_results[0] == af.rgoAction[0].dwObjID,
+ "Mapped incorrectly expected: 0x%08x got: 0x%08x\n", other_results[0], af.rgoAction[0].dwObjID);
+ ok (af.rgoAction[0].dwHow == DIAH_UNMAPPED, "dwHow should have been DIAH_UNMAPPED\n");
+ ok (IsEqualGUID(&NULL_GUID, &af.rgoAction[0].guidInstance), "Action should not be mapped\n");
+
+ ok (other_results[1] == af.rgoAction[1].dwObjID,
+ "Mapped incorrectly expected: 0x%08x got: 0x%08x\n", other_results[1], af.rgoAction[1].dwObjID);
+ ok (af.rgoAction[1].dwHow == DIAH_UNMAPPED, "dwHow should have been DIAH_UNMAPPED\n");
+ ok (IsEqualGUID(&NULL_GUID, &af.rgoAction[1].guidInstance), "Action should not be mapped\n");
+
IDirectInputDevice_Release(pKey);
IDirectInput_Release(pDI);
}
--
2.34.1
2.39.2

View File

@@ -1,30 +1,29 @@
From da59fcb896bc204ea0ea1d866eeddef0c9b962c4 Mon Sep 17 00:00:00 2001
From d09ac9a348309f956a2f3985a1b465b51b6e174c Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 28 Mar 2015 08:18:10 +0100
Subject: [PATCH] dsound: Apply filters before sound is multiplied to speakers.
Based on a patch by Mark Harmstone.
---
dlls/dsound/dsound.c | 2 +
dlls/dsound/dsound.c | 1 +
dlls/dsound/dsound_private.h | 4 +-
dlls/dsound/mixer.c | 109 ++++++++++++++++++++++++-----------
3 files changed, 80 insertions(+), 35 deletions(-)
dlls/dsound/mixer.c | 112 ++++++++++++++++++++++++-----------
3 files changed, 81 insertions(+), 36 deletions(-)
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 346cc4ceca3..e869c4dd251 100644
index 0b8edaaaf06..bdf3a824511 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -234,6 +234,8 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
@@ -234,6 +234,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
if(device->mmdevice)
IMMDevice_Release(device->mmdevice);
CloseHandle(device->sleepev);
+
+ HeapFree(GetProcessHeap(), 0, device->dsp_buffer);
HeapFree(GetProcessHeap(), 0, device->tmp_buffer);
HeapFree(GetProcessHeap(), 0, device->cp_buffer);
HeapFree(GetProcessHeap(), 0, device->buffer);
+ free(device->dsp_buffer);
free(device->tmp_buffer);
free(device->cp_buffer);
free(device->buffer);
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index f89588de4d9..d4e74ed0e82 100644
index 124a4311b4c..fe39ca221fa 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -89,8 +89,8 @@ struct DirectSoundDevice
@@ -39,7 +38,7 @@ index f89588de4d9..d4e74ed0e82 100644
DSVOLUMEPAN volpan;
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 50816b1a582..ddab45893ac 100644
index c26b19ea8c1..68a45c46d1e 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -283,10 +283,9 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb,
@@ -150,7 +149,7 @@ index 50816b1a582..ddab45893ac 100644
/**
* Mix at most the given amount of data into the allocated temporary buffer
* of the given secondary buffer, starting from the dsb's first currently
@@ -497,34 +511,63 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
@@ -497,31 +511,61 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
*/
static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
{
@@ -165,21 +164,20 @@ index 50816b1a582..ddab45893ac 100644
- if (dsb->device->tmp_buffer_len < size_bytes || !dsb->device->tmp_buffer)
- {
- dsb->device->tmp_buffer_len = size_bytes;
- dsb->device->tmp_buffer = realloc(dsb->device->tmp_buffer, size_bytes);
- }
- if(dsb->put_aux == putieee32_sum)
- memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len);
+ put = dsb->put;
+ ostride = dsb->device->pwfx->nChannels * sizeof(float);
+ size_bytes = frames * ostride;
+
+ if (dsb->device->tmp_buffer_len < size_bytes || !dsb->device->tmp_buffer) {
if (dsb->device->tmp_buffer)
dsb->device->tmp_buffer = HeapReAlloc(GetProcessHeap(), 0, dsb->device->tmp_buffer, size_bytes);
else
dsb->device->tmp_buffer = HeapAlloc(GetProcessHeap(), 0, size_bytes);
+ dsb->device->tmp_buffer_len = size_bytes;
}
- if(dsb->put_aux == putieee32_sum)
- memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len);
-
- cp_fields(dsb, frames, &dsb->freqAccNum);
+ if (dsb->device->tmp_buffer_len < size_bytes || !dsb->device->tmp_buffer)
+ {
+ dsb->device->tmp_buffer_len = size_bytes;
+ dsb->device->tmp_buffer = realloc(dsb->device->tmp_buffer, size_bytes);
+ }
+ if(dsb->put_aux == putieee32_sum)
+ memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len);
+
@@ -234,5 +232,5 @@ index 50816b1a582..ddab45893ac 100644
static void DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, INT frames)
--
2.35.1
2.39.2

View File

@@ -1,4 +1,4 @@
From 5d29a2de174042ce7bdd52d92337591933e0f761 Mon Sep 17 00:00:00 2001
From 42c58e406220e9351337b079ae44364fbc39365d Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Fri, 27 Mar 2015 20:58:37 +0000
Subject: [PATCH] dsound: Add EAX init and free stubs.
@@ -10,10 +10,10 @@ Subject: [PATCH] dsound: Add EAX init and free stubs.
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index e8b3fb4a832..28f2e95994e 100644
index 22b23c9f877..72e96765883 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -1153,6 +1153,8 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
@@ -1152,6 +1152,8 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
DSOUND_RecalcVolPan(&(dsb->volpan));
InitializeSRWLock(&dsb->lock);
@@ -22,17 +22,17 @@ index e8b3fb4a832..28f2e95994e 100644
/* register buffer */
err = DirectSoundDevice_AddBuffer(device, dsb);
@@ -1194,6 +1196,8 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This)
HeapFree(GetProcessHeap(), 0, This->filters);
@@ -1193,6 +1195,8 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This)
free(This->filters);
}
+ free_eax_buffer(This);
+
TRACE("(%p) released\n", This);
HeapFree(GetProcessHeap(), 0, This);
free(This);
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index 267b2c044bc..c906eb2adb1 100644
index 09566b28a12..703b5da8225 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -240,6 +240,8 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
@@ -97,5 +97,5 @@ index 03b6e0a9813..91438efc335 100644
HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
--
2.35.1
2.39.2

View File

@@ -1,4 +1,4 @@
From 3760db8daceee555842425400af01de2075b4568 Mon Sep 17 00:00:00 2001
From 673e9f32e39fce78a02f6519a435051ffec3664d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 4 Apr 2015 21:09:18 +0200
Subject: [PATCH] dsound: Various improvements to EAX support.
@@ -24,19 +24,19 @@ the buffers).
5 files changed, 37 insertions(+), 39 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 6b7414d34ff..b1efa0d3012 100644
index 72e96765883..bdb93657017 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -1213,7 +1213,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
@@ -1223,7 +1223,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
VOID *committedbuff;
TRACE("(%p,%p,%p)\n", device, ppdsb, pdsb);
- dsb = HeapAlloc(GetProcessHeap(),0,sizeof(*dsb));
+ dsb = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(*dsb));
- dsb = malloc(sizeof(*dsb));
+ dsb = calloc(1, sizeof(*dsb));
if (dsb == NULL) {
WARN("out of memory\n");
*ppdsb = NULL;
@@ -1261,6 +1261,8 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
@@ -1271,6 +1271,8 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
InitializeSRWLock(&dsb->lock);
@@ -46,7 +46,7 @@ index 6b7414d34ff..b1efa0d3012 100644
hres = DirectSoundDevice_AddBuffer(device, dsb);
if (hres != DS_OK) {
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 91fa94b943e..a0931325ebc 100644
index bdf3a824511..4df26e93c6e 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -182,6 +182,8 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice)
@@ -71,10 +71,10 @@ index a650108f570..a555a75e458 100644
float *SampleBuffer;
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index 43e62626161..065fe820055 100644
index 9131fa8792e..f2b2c353643 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -239,6 +239,7 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
@@ -240,6 +240,7 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
ULONG dwPropID, void *pInstanceData, ULONG cbInstanceData, void *pPropData,
ULONG cbPropData) DECLSPEC_HIDDEN;
@@ -83,7 +83,7 @@ index 43e62626161..065fe820055 100644
void init_eax_buffer(IDirectSoundBufferImpl *dsb) DECLSPEC_HIDDEN;
void process_eax_buffer(IDirectSoundBufferImpl *dsb, float *buf, DWORD count) DECLSPEC_HIDDEN;
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
index a05b00e1c02..ef802b95a7d 100644
index 5f2b8ef07e2..2244565897b 100644
--- a/dlls/dsound/eax.c
+++ b/dlls/dsound/eax.c
@@ -114,6 +114,8 @@ static const float LATE_LINE_MULTIPLIER = 4.0f;
@@ -244,5 +244,5 @@ index a05b00e1c02..ef802b95a7d 100644
switch (dwPropID) {
case DSPROPERTY_EAXBUFFER_ALL:
--
2.33.0
2.39.2

View File

@@ -1,4 +1,4 @@
From b332f5a5dd03b7d71515a2fddefa787da3fb7b5e Mon Sep 17 00:00:00 2001
From 9e4371e8d0aaf8b4c5578c41adf8e1dd4436b1f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 9 Jan 2016 16:57:49 +0100
Subject: [PATCH] explorer: Create CurrentControlSet\Control\Video registry key
@@ -14,7 +14,7 @@ Signed-off-by: Michael MĂĽller <michael@fds-team.de>
2 files changed, 16 insertions(+)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index dfadd13ea8c..b3e5888da92 100644
index 480e96ef6ee..49aacc905b1 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -1318,6 +1318,13 @@ static void test_reg_create_key(void)
@@ -32,12 +32,12 @@ index dfadd13ea8c..b3e5888da92 100644
hkey1 = NULL;
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_32KEY, NULL, &hkey1, NULL);
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c
index 94d178880a8..95f06e50b7d 100644
index 81eb0d1d01b..f742cd6d30b 100644
--- a/programs/explorer/desktop.c
+++ b/programs/explorer/desktop.c
@@ -792,6 +792,11 @@ static BOOL get_default_enable_shell( const WCHAR *name )
@@ -878,6 +878,11 @@ static BOOL get_default_enable_shell( const WCHAR *name )
static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
static HMODULE load_graphics_driver( const WCHAR *driver, GUID *guid )
{
+ static const WCHAR video_keyW[] = {
+ 'S','y','s','t','e','m','\\',
@@ -47,7 +47,7 @@ index 94d178880a8..95f06e50b7d 100644
static const WCHAR device_keyW[] = {
'S','y','s','t','e','m','\\',
'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
@@ -859,6 +864,10 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
@@ -947,6 +952,10 @@ static HMODULE load_graphics_driver( const WCHAR *driver, GUID *guid )
TRACE( "display %s driver %s\n", debugstr_guid(guid), debugstr_w(libname) );
@@ -59,5 +59,5 @@ index 94d178880a8..95f06e50b7d 100644
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
--
2.30.2
2.39.2

View File

@@ -1,4 +1,4 @@
From 8b6a7baacf0a26c7de7524c5f6da37bf4f4c1120 Mon Sep 17 00:00:00 2001
From bc1d0962b58a45949c91367e84e6f71beb9f698b Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 30 Aug 2021 15:16:06 +1000
Subject: [PATCH] ntoskrnl.exe: Add FltBuildDefaultSecurityDescriptor test
@@ -23,7 +23,7 @@ index ab1db85adbb..9c89e44e70a 100644
driver2_IMPORTS = winecrt0 ntoskrnl hal
driver2_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
index de61ed64fa4..a0cdbf0878a 100644
index 18f2920759d..569007d435e 100644
--- a/dlls/ntoskrnl.exe/tests/driver.c
+++ b/dlls/ntoskrnl.exe/tests/driver.c
@@ -32,6 +32,7 @@
@@ -34,7 +34,7 @@ index de61ed64fa4..a0cdbf0878a 100644
#include "driver.h"
@@ -2338,6 +2339,69 @@ static void test_default_modules(void)
@@ -2374,6 +2375,69 @@ static void test_default_modules(void)
ok(dxgmms1, "Failed to find dxgmms1.sys\n");
}
@@ -104,14 +104,14 @@ index de61ed64fa4..a0cdbf0878a 100644
static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack)
{
void *buffer = irp->AssociatedIrp.SystemBuffer;
@@ -2382,6 +2446,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
test_dpc();
@@ -2419,6 +2483,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
test_process_memory(test_input);
test_permanence();
test_driver_object_extension();
+ test_default_security();
IoMarkIrpPending(irp);
IoQueueWorkItem(work_item, main_test_task, DelayedWorkQueue, irp);
--
2.35.1
2.39.2

View File

@@ -1,4 +1,4 @@
From f2347ae7216626d248cfaf9445862561b2b5eef7 Mon Sep 17 00:00:00 2001
From d1d83243555801226876f651b6f3304d3e595ae4 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 1 Jul 2019 09:58:55 +1000
Subject: [PATCH] loader: Add Keyboard Layouts registry enteries.
@@ -9,7 +9,7 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
1 file changed, 209 insertions(+)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index ff601e41b26..6ffb8c56d87 100644
index d5f943861a8..b07843ff237 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -63,6 +63,7 @@ AddReg=\
@@ -20,7 +20,7 @@ index ff601e41b26..6ffb8c56d87 100644
MCI,\
Misc,\
OLE,\
@@ -87,6 +88,7 @@ AddReg=\
@@ -86,6 +87,7 @@ AddReg=\
Debugger,\
DirectX,\
Fonts,\
@@ -28,7 +28,7 @@ index ff601e41b26..6ffb8c56d87 100644
MCI,\
Misc,\
OLE,\
@@ -113,6 +115,7 @@ AddReg=\
@@ -111,6 +113,7 @@ AddReg=\
Debugger,\
DirectX,\
Fonts,\
@@ -36,15 +36,15 @@ index ff601e41b26..6ffb8c56d87 100644
MCI,\
Misc,\
OLE,\
@@ -160,6 +163,7 @@ AddReg=\
CurrentVersionWow64,\
@@ -156,6 +159,7 @@ AddReg=\
CurrentVersionWow64.ntx86,\
Debugger,\
DirectX,\
+ KeyboardLayouts,\
MCI,\
Misc,\
Tapi,\
@@ -597,6 +601,211 @@ HKCU,Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoic
@@ -628,6 +632,211 @@ HKCU,Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoic
HKCU,Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice,"ProgId",,"http"
HKCU,Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice,"ProgId",,"https"
@@ -257,5 +257,5 @@ index ff601e41b26..6ffb8c56d87 100644
HKLM,"Software\Microsoft\OLE","EnableDCOM",,"Y"
HKLM,"Software\Microsoft\OLE","EnableRemoteConnect",,"N"
--
2.35.1
2.39.2

View File

@@ -1,4 +1,4 @@
From c1ecb277d4b77d59bd113a530bea556c356f81cc Mon Sep 17 00:00:00 2001
From 2a1229098b39f923ff6e9a13bde05e161c797b0a 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: Do not enumerate the registry in
@@ -13,22 +13,22 @@ not the complete list from the registry.
3 files changed, 36 insertions(+), 33 deletions(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 3b0a13842c8..2027ce10358 100644
index 8f3cd8acae7..072f1fab23a 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -494,7 +494,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
@@ -499,7 +499,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
return FALSE;
}
-
static DWORD CALLBACK devnotify_window_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header)
static DWORD CALLBACK devnotify_window_callbackW(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header)
{
SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL);
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index f8b40099091..6551367788c 100644
index 8f3d5750c2f..3bdfd042e85 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -4875,6 +4875,40 @@ static void test_EnableMouseInPointer( char **argv, BOOL enable )
@@ -5091,6 +5091,40 @@ static void test_EnableMouseInPointer( char **argv, BOOL enable )
CloseHandle( info.hProcess );
}
@@ -69,7 +69,7 @@ index f8b40099091..6551367788c 100644
START_TEST(input)
{
char **argv;
@@ -4925,6 +4959,7 @@ START_TEST(input)
@@ -5142,6 +5176,7 @@ START_TEST(input)
test_GetRawInputBuffer();
test_RegisterRawInputDevices();
test_rawinput(argv[0]);
@@ -78,10 +78,10 @@ index f8b40099091..6551367788c 100644
if(pGetMouseMovePointsEx)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index 36f7404b296..bdbd24b5695 100644
index 11bb129134c..9864d80ceff 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -934,11 +934,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
@@ -1250,11 +1250,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
*/
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
{
@@ -94,7 +94,7 @@ index 36f7404b296..bdbd24b5695 100644
HKL layout;
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
@@ -952,33 +948,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
@@ -1268,33 +1264,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
if (size && layouts)
{
layouts[count - 1] = layout;
@@ -111,10 +111,10 @@ index 36f7404b296..bdbd24b5695 100644
- tmp = wcstoul( key_info->Name, NULL, 16 );
- if (query_reg_ascii_value( subkey, "Layout Id", value_info, sizeof(buffer) ) &&
- value_info->Type == REG_SZ)
- tmp = MAKELONG( LOWORD( tmp ),
- 0xf000 | (wcstoul( (const WCHAR *)value_info->Data, NULL, 16 ) & 0xfff) );
- tmp = 0xf000 | (wcstoul( (const WCHAR *)value_info->Data, NULL, 16 ) & 0xfff);
- NtClose( subkey );
-
- tmp = MAKELONG( LOWORD( layout ), LOWORD( tmp ) );
- if (layout == UlongToHandle( tmp )) continue;
-
- count++;
@@ -129,5 +129,5 @@ index 36f7404b296..bdbd24b5695 100644
return count;
--
2.39.1
2.39.2

View File

@@ -1,4 +1,4 @@
From c933925dbe192c65d00bfa9bccc26bb7b21984fa Mon Sep 17 00:00:00 2001
From eb96135501ef2822072e8f774868dd55ab3935ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 3 Apr 2017 05:30:27 +0200
Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
@@ -109,10 +109,10 @@ index 365f4465fc7..aca2b0f24cb 100644
test_dll_file( "kernel32.dll" );
test_dll_file( "advapi32.dll" );
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 7661227e951..1087cf72d99 100644
index cbd2fa2d384..693ba94dc71 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -128,6 +128,9 @@ struct file_id
@@ -129,6 +129,9 @@ struct file_id
BYTE ObjectId[16];
};
@@ -122,7 +122,7 @@ index 7661227e951..1087cf72d99 100644
/* internal representation of loaded modules */
typedef struct _wine_modref
{
@@ -497,6 +500,33 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
@@ -498,6 +501,33 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
}
}
@@ -156,7 +156,7 @@ index 7661227e951..1087cf72d99 100644
/*************************************************************************
* get_modref
*
@@ -1476,7 +1506,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
@@ -1477,7 +1507,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
&wm->ldr.InLoadOrderLinks);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderLinks);
@@ -169,7 +169,7 @@ index 7661227e951..1087cf72d99 100644
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
{
@@ -2154,6 +2189,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
@@ -2155,6 +2190,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
/* the module has only be inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
@@ -177,7 +177,7 @@ index 7661227e951..1087cf72d99 100644
/* FIXME: there are several more dangling references
* left. Including dlls loaded by this dll before the
@@ -3749,6 +3785,7 @@ static void free_modref( WINE_MODREF *wm )
@@ -3796,6 +3832,7 @@ static void free_modref( WINE_MODREF *wm )
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
@@ -185,7 +185,7 @@ index 7661227e951..1087cf72d99 100644
if (wm->ldr.InInitializationOrderLinks.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
@@ -4117,6 +4154,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
@@ -4167,6 +4204,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
ANSI_STRING ctrl_routine = RTL_CONSTANT_STRING( "CtrlRoutine" );
WINE_MODREF *kernel32;
PEB *peb = NtCurrentTeb()->Peb;
@@ -193,9 +193,9 @@ index 7661227e951..1087cf72d99 100644
NtQueryVirtualMemory( GetCurrentProcess(), LdrInitializeThunk, MemoryBasicInformation,
&meminfo, sizeof(meminfo), NULL );
@@ -4135,6 +4173,10 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
sizeof(peb->TlsExpansionBitmapBits) * 8 );
RtlSetBits( peb->TlsBitmap, 0, 1 ); /* TLS index 0 is reserved and should be initialized to NULL. */
@@ -4184,6 +4222,10 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
/* TLS index 0 is always reserved, and wow64 reserves extra TLS entries */
RtlSetBits( peb->TlsBitmap, 0, NtCurrentTeb()->WowTebOffset ? WOW64_TLS_MAX_NUMBER : 1 );
+ /* initialize hash table */
+ for (i = 0; i < HASH_MAP_SIZE; i++)
@@ -205,5 +205,5 @@ index 7661227e951..1087cf72d99 100644
load_global_options();
version_init();
--
2.39.0
2.39.2

View File

@@ -1,88 +0,0 @@
From e46de2c7f78d1b8b336868276a23f4ca1d191599 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 22 Jul 2017 06:41:53 +0200
Subject: ntdll: Add helper function to delete free blocks.
---
dlls/ntdll/heap.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index f928ebff500..dc45a688925 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -485,6 +485,17 @@ static inline void HEAP_InsertFreeBlock( HEAP *heap, ARENA_FREE *pArena, BOOL la
/***********************************************************************
+ * HEAP_DeleteFreeBlock
+ *
+ * Delete a free block from the free list.
+ */
+static inline void HEAP_DeleteFreeBlock( HEAP *heap, ARENA_FREE *pArena )
+{
+ list_remove( &pArena->entry );
+}
+
+
+/***********************************************************************
* HEAP_FindSubHeap
* Find the sub-heap containing a given address.
*
@@ -592,7 +603,7 @@ static void HEAP_CreateFreeBlock( SUBHEAP *subheap, void *ptr, SIZE_T size )
{
/* Remove the next arena from the free list */
ARENA_FREE *pNext = (ARENA_FREE *)((char *)ptr + size);
- list_remove( &pNext->entry );
+ HEAP_DeleteFreeBlock( subheap->heap, pNext );
size += (pNext->size & ARENA_SIZE_MASK) + sizeof(*pNext);
mark_block_free( pNext, sizeof(ARENA_FREE), flags );
}
@@ -647,7 +658,7 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena )
pFree = *((ARENA_FREE **)pArena - 1);
size += (pFree->size & ARENA_SIZE_MASK) + sizeof(ARENA_FREE);
/* Remove it from the free list */
- list_remove( &pFree->entry );
+ HEAP_DeleteFreeBlock( heap, pFree );
}
else pFree = (ARENA_FREE *)pArena;
@@ -667,7 +678,7 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena )
size = 0;
/* Remove the free block from the list */
- list_remove( &pFree->entry );
+ HEAP_DeleteFreeBlock( heap, pFree );
/* Remove the subheap from the list */
list_remove( &subheap->entry );
/* Free the memory */
@@ -1697,7 +1708,7 @@ PVOID WINAPI RtlAllocateHeap( HANDLE heap, ULONG flags, SIZE_T size )
/* Remove the arena from the free list */
- list_remove( &pArena->entry );
+ HEAP_DeleteFreeBlock( heapPtr, pArena );
/* Build the in-use arena */
@@ -1854,7 +1865,7 @@ PVOID WINAPI RtlReAllocateHeap( HANDLE heap, ULONG flags, PVOID ptr, SIZE_T size
{
/* The next block is free and large enough */
ARENA_FREE *pFree = (ARENA_FREE *)pNext;
- list_remove( &pFree->entry );
+ HEAP_DeleteFreeBlock( heapPtr, pFree );
pArena->size += (pFree->size & ARENA_SIZE_MASK) + sizeof(*pFree);
if (!HEAP_Commit( subheap, pArena, rounded_size )) goto oom;
notify_realloc( pArena + 1, oldActualSize, size );
@@ -1872,7 +1883,7 @@ PVOID WINAPI RtlReAllocateHeap( HANDLE heap, ULONG flags, PVOID ptr, SIZE_T size
/* Build the in-use arena */
- list_remove( &pNew->entry );
+ HEAP_DeleteFreeBlock( heapPtr, pNew );
pInUse = (ARENA_INUSE *)pNew;
pInUse->size = (pInUse->size & ~ARENA_FLAG_FREE)
+ sizeof(ARENA_FREE) - sizeof(ARENA_INUSE);
--
2.13.1

View File

@@ -1,2 +0,0 @@
Fixes: [43224] Improvement for heap allocation performance
Disabled: True

View File

@@ -18,7 +18,6 @@ fails.
---
dlls/kernel32/tests/thread.c | 4 ----
dlls/ntdll/unix/signal_i386.c | 2 --
libs/wine/ldt.c | 4 +---
3 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
@@ -55,28 +54,6 @@ index 30f1aee4d62..0ab09c1b4df 100644
server_enter_uninterrupted_section( &ldt_mutex, &sigset );
if (sel1) ldt_set_entry( sel1, entry1 );
diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c
index 18b0b9be9bf..30d9b945f73 100644
--- a/libs/wine/ldt.c
+++ b/libs/wine/ldt.c
@@ -200,8 +200,6 @@ static int internal_set_entry( unsigned short sel, const LDT_ENTRY *entry )
{
int ret = 0, index = sel >> 3;
- if (index < LDT_FIRST_ENTRY) return 0; /* cannot modify reserved entries */
-
#ifdef linux
{
struct modify_ldt_s ldt_info;
@@ -253,7 +251,7 @@ static int internal_set_entry( unsigned short sel, const LDT_ENTRY *entry )
wine_ldt_copy_obsolete.limit[index] = wine_ldt_get_limit(entry);
wine_ldt_copy_obsolete.flags[index] = (entry->HighWord.Bits.Type |
(entry->HighWord.Bits.Default_Big ? WINE_LDT_FLAGS_32BIT : 0) |
- (wine_ldt_copy_obsolete.flags[index] & WINE_LDT_FLAGS_ALLOCATED));
+ WINE_LDT_FLAGS_ALLOCATED);
}
return ret;
}
--
2.27.0

View File

@@ -1,4 +1,4 @@
From 3c8ddcd9f29524479004800c91a39ec04456bd08 Mon Sep 17 00:00:00 2001
From b7ce843ce7c536b452aee408ab127a8300412909 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 00:50:50 +0100
Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
@@ -20,7 +20,7 @@ index 90deb5865f8..428ebde23b3 100644
C_SRCS = \
atom.c \
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index a7c43a46e07..9088d222b47 100644
index 3a5564fc6b8..5408fc4b7da 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -28,6 +28,9 @@
@@ -53,7 +53,7 @@ index a7c43a46e07..9088d222b47 100644
pLdrRegisterDllNotification = (void *)GetProcAddress(hntdll, "LdrRegisterDllNotification");
pLdrUnregisterDllNotification = (void *)GetProcAddress(hntdll, "LdrUnregisterDllNotification");
}
@@ -3788,6 +3797,76 @@ static void test_RtlFirstFreeAce(void)
@@ -3608,6 +3617,76 @@ static void test_RtlFirstFreeAce(void)
HeapFree(GetProcessHeap(), 0, acl);
}
@@ -127,10 +127,10 @@ index a7c43a46e07..9088d222b47 100644
+ CoUninitialize();
+}
+
static void test_TlsIndex(void)
START_TEST(rtl)
{
LIST_ENTRY *root = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
@@ -3852,6 +3931,7 @@ START_TEST(rtl)
InitFunctionPtrs();
@@ -3647,6 +3726,7 @@ START_TEST(rtl)
test_RtlInitializeCriticalSectionEx();
test_RtlLeaveCriticalSection();
test_LdrEnumerateLoadedModules();
@@ -139,5 +139,5 @@ index a7c43a46e07..9088d222b47 100644
test_LdrRegisterDllNotification();
test_DbgPrint();
--
2.39.0
2.39.2

View File

@@ -1,4 +1,4 @@
From 0ed959d4122e705d8728a7064ff260d2a6955af5 Mon Sep 17 00:00:00 2001
From ff8f658065ac9b61fbbf3d2adc95fb63bf75bb6e Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Sun, 10 Aug 2014 22:17:57 +0800
Subject: [PATCH] riched20: Stub for ITextPara interface and implement
@@ -10,7 +10,7 @@ Subject: [PATCH] riched20: Stub for ITextPara interface and implement
2 files changed, 477 insertions(+)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index afecd34dc2a..6b94ee89902 100644
index 90496742e36..7b7e4e49ef0 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -3563,6 +3563,16 @@ static ULONG WINAPI TextPara_Release(ITextPara *iface)
@@ -559,11 +559,11 @@ index afecd34dc2a..6b94ee89902 100644
}
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index a01f4e21db8..e44ffc767e7 100644
index fb5177b83e9..cde2a9ab4c3 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -5439,6 +5439,274 @@ static void test_undo_control(void)
release_interfaces(&inst.hwnd, &reole, &inst.doc, &selection);
@@ -5565,6 +5565,274 @@ static void test_freeze(void)
release_interfaces(&hwnd, &reole, &doc, &selection);
}
+static void test_ITextRange_SetStart(void)
@@ -837,7 +837,7 @@ index a01f4e21db8..e44ffc767e7 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -5459,6 +5727,13 @@ START_TEST(richole)
@@ -5585,6 +5853,13 @@ START_TEST(richole)
test_ITextRange_SetRange();
test_ITextRange_GetDuplicate();
test_ITextRange_Collapse();
@@ -852,5 +852,5 @@ index a01f4e21db8..e44ffc767e7 100644
test_IOleWindow_GetWindow();
test_IOleInPlaceSite_GetWindow();
--
2.35.1
2.39.2

View File

@@ -1,4 +1,4 @@
From 05d2f03034c4bd2cc97f22c67e7bd9de3c3f710b Mon Sep 17 00:00:00 2001
From 5cd6a66d34a8844d757413804a6b4b358075993d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Fri, 17 Jan 2020 16:33:11 +0100
Subject: [PATCH] winex11.drv: Split XInput2 thread initialization.
@@ -11,10 +11,10 @@ And rename the library and function loader to x11drv_xinput_load.
3 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 51a6828f10c..121f42eb541 100644
index c34f5fde77e..f9cf4a33255 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -277,6 +277,32 @@ static void update_relative_valuators(XIAnyClassInfo **valuators, int n_valuator
@@ -278,6 +278,32 @@ static void update_relative_valuators(XIAnyClassInfo **valuators, int n_valuator
}
@@ -47,7 +47,7 @@ index 51a6828f10c..121f42eb541 100644
/***********************************************************************
* enable_xinput2
*/
@@ -288,19 +314,9 @@ static void enable_xinput2(void)
@@ -289,19 +315,9 @@ static void enable_xinput2(void)
unsigned char mask_bits[XIMaskLen(XI_LASTEVENT)];
int count;
@@ -69,7 +69,7 @@ index 51a6828f10c..121f42eb541 100644
if (!pXIGetClientPointer( data->display, None, &data->xi2_core_pointer )) return;
mask.mask = mask_bits;
@@ -341,9 +357,9 @@ static void disable_xinput2(void)
@@ -342,9 +358,9 @@ static void disable_xinput2(void)
struct x11drv_thread_data *data = x11drv_thread_data();
XIEventMask mask;
@@ -80,7 +80,7 @@ index 51a6828f10c..121f42eb541 100644
data->xi2_state = xi_disabled;
mask.mask = NULL;
@@ -1921,9 +1937,9 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
@@ -1954,9 +1970,9 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
/***********************************************************************
@@ -93,10 +93,10 @@ index 51a6828f10c..121f42eb541 100644
#if defined(SONAME_LIBXI) && defined(HAVE_X11_EXTENSIONS_XINPUT2_H)
int event, error;
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 8bcc204db9b..3f3e386ea4a 100644
index 10a68779003..a8bbc207007 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -247,7 +247,8 @@ extern void CDECL X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN;
@@ -258,7 +258,8 @@ extern void X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN;
/* X11 driver internal functions */
extern void X11DRV_Xcursor_Init(void) DECLSPEC_HIDDEN;
@@ -107,19 +107,19 @@ index 8bcc204db9b..3f3e386ea4a 100644
extern DWORD copy_image_bits( BITMAPINFO *info, BOOL is_r8g8b8, XImage *image,
const struct gdi_image_bits *src_bits, struct gdi_image_bits *dst_bits,
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index 32beb84a009..2e083e322ec 100644
index 03a09a32d8a..657d8f52db0 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -619,7 +619,7 @@ static BOOL process_attach(void)
@@ -704,7 +704,7 @@ static NTSTATUS x11drv_init( void *arg )
#ifdef SONAME_LIBXCOMPOSITE
X11DRV_XComposite_Init();
#endif
- X11DRV_XInput2_Init();
+ x11drv_xinput_load();
#ifdef HAVE_XKB
if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL );
@@ -713,6 +713,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
XkbUseExtension( gdi_display, NULL, NULL );
X11DRV_InitKeyboard( gdi_display );
@@ -794,6 +794,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
if (use_xim) X11DRV_SetupXIM();
@@ -129,5 +129,5 @@ index 32beb84a009..2e083e322ec 100644
}
--
2.34.1
2.39.2

View File

@@ -1,4 +1,4 @@
From fc733a73005bccb09df5572755595e427f667d56 Mon Sep 17 00:00:00 2001
From 9f8722c6be41731d7913f804591a0c28999340cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 19 Dec 2019 22:34:44 +0100
Subject: [PATCH] winex11.drv: Keep track of pointer and device button
@@ -16,10 +16,10 @@ Original patch by Andrew Eikum <aeikum@codeweavers.com>.
4 files changed, 106 insertions(+), 8 deletions(-)
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index 6b876c3bee9..2c7c2e6c5be 100644
index 616728be621..5d02da68313 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1876,13 +1876,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
@@ -1863,13 +1863,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
{
HWND hwnd;
@@ -51,10 +51,10 @@ index 6b876c3bee9..2c7c2e6c5be 100644
}
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index abd136bca02..8878a99d14e 100644
index 00c55802245..e25b3e7728a 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -26,6 +26,9 @@
@@ -30,6 +30,9 @@
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
#include <stdarg.h>
@@ -64,7 +64,7 @@ index abd136bca02..8878a99d14e 100644
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
#include <X11/extensions/XInput2.h>
#endif
@@ -143,6 +146,14 @@ MAKE_FUNCPTR(XISelectEvents);
@@ -144,6 +147,14 @@ MAKE_FUNCPTR(XISelectEvents);
#undef MAKE_FUNCPTR
#endif
@@ -79,7 +79,7 @@ index abd136bca02..8878a99d14e 100644
/***********************************************************************
* X11DRV_Xcursor_Init
*
@@ -248,6 +259,70 @@ void sync_window_cursor( Window window )
@@ -249,6 +260,70 @@ void sync_window_cursor( Window window )
set_window_cursor( window, cursor );
}
@@ -150,7 +150,7 @@ index abd136bca02..8878a99d14e 100644
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
/***********************************************************************
* update_relative_valuators
@@ -1847,6 +1922,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
@@ -1876,6 +1951,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
if (event->reason != XISlaveSwitch) return FALSE;
update_relative_valuators( event->classes, event->num_classes );
@@ -159,7 +159,7 @@ index abd136bca02..8878a99d14e 100644
return TRUE;
}
@@ -1933,13 +2010,12 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
@@ -1963,13 +2040,12 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
#endif /* HAVE_X11_EXTENSIONS_XINPUT2_H */
@@ -174,7 +174,7 @@ index abd136bca02..8878a99d14e 100644
int event, error;
void *libxi_handle = dlopen( SONAME_LIBXI, RTLD_NOW );
@@ -1955,11 +2031,20 @@ void x11drv_xinput_load(void)
@@ -1985,11 +2061,20 @@ void x11drv_xinput_load(void)
return; \
}
@@ -196,29 +196,29 @@ index abd136bca02..8878a99d14e 100644
xinput2_available = XQueryExtension( gdi_display, "XInputExtension", &xinput2_opcode, &event, &error );
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 4a1504567a1..f2ae3ecdfa3 100644
index 20172a99853..4394ea6d001 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -698,6 +698,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
@@ -702,6 +702,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
extern BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) DECLSPEC_HIDDEN;
extern void move_resize_window( HWND hwnd, int dir ) DECLSPEC_HIDDEN;
extern void X11DRV_InitKeyboard( Display *display ) DECLSPEC_HIDDEN;
+extern void X11DRV_InitMouse( Display *display ) DECLSPEC_HIDDEN;
extern NTSTATUS X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
const LARGE_INTEGER *timeout,
DWORD mask, DWORD flags ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_ProcessEvents( DWORD mask ) DECLSPEC_HIDDEN;
extern HWND *build_hwnd_list(void) DECLSPEC_HIDDEN;
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index 7ed0a6e3a02..33814d1f6fb 100644
index 657d8f52db0..142bd596dd3 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -685,6 +685,7 @@ static BOOL process_attach(void)
if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL );
#endif
@@ -708,6 +708,7 @@ static NTSTATUS x11drv_init( void *arg )
XkbUseExtension( gdi_display, NULL, NULL );
X11DRV_InitKeyboard( gdi_display );
+ X11DRV_InitMouse( gdi_display );
if (use_xim) use_xim = X11DRV_InitXIM( input_style );
init_user_driver();
--
2.35.1
2.39.2

View File

@@ -1,4 +1,4 @@
From b3e1675f4654daecf5237f86a6bfa5d3512c109c Mon Sep 17 00:00:00 2001
From f13bfd6f599ae272f698bb06491d689bd6d5d142 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 26 Aug 2019 14:37:20 +0200
Subject: [PATCH] server: Add send_hardware_message flags for rawinput
@@ -11,31 +11,31 @@ Subject: [PATCH] server: Add send_hardware_message flags for rawinput
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c
index 74cfec0651a..fbdd09ad806 100644
index ad3d8e85cd2..bad69c18142 100644
--- a/dlls/win32u/message.c
+++ b/dlls/win32u/message.c
@@ -1912,6 +1912,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
@@ -2627,6 +2627,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
req->input.mouse.flags = input->mi.dwFlags;
req->input.mouse.time = input->mi.time;
req->input.mouse.info = input->mi.dwExtraInfo;
+ req->flags |= SEND_HWMSG_RAWINPUT;
break;
case INPUT_KEYBOARD:
req->input.kbd.vkey = input->ki.wVk;
@@ -1919,6 +1920,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
affects_key_state = !!(input->mi.dwFlags & (MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP |
MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP |
MOUSEEVENTF_MIDDLEDOWN | MOUSEEVENTF_MIDDLEUP |
@@ -2638,6 +2639,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
req->input.kbd.flags = input->ki.dwFlags;
req->input.kbd.time = input->ki.time;
req->input.kbd.info = input->ki.dwExtraInfo;
+ req->flags |= SEND_HWMSG_RAWINPUT;
affects_key_state = TRUE;
break;
case INPUT_HARDWARE:
req->input.hw.msg = input->hi.uMsg;
diff --git a/server/protocol.def b/server/protocol.def
index 673fcdd6c8d..0c1b6b57518 100644
index a4660a21aca..9e6ba5317fd 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2041,6 +2041,7 @@ enum message_type
VARARG(keystate,bytes); /* global state array for all the keys */
@@ -2082,6 +2082,7 @@ enum message_type
int new_y;
@END
#define SEND_HWMSG_INJECTED 0x01
+#define SEND_HWMSG_RAWINPUT 0x02
@@ -43,10 +43,10 @@ index 673fcdd6c8d..0c1b6b57518 100644
/* Get a message from the current queue */
diff --git a/server/queue.c b/server/queue.c
index e11e24378e6..950a2cdce22 100644
index 61cbeec75dd..f5dbe0e733e 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1815,7 +1815,7 @@ done:
@@ -1794,7 +1794,7 @@ done:
/* queue a hardware message for a mouse event */
static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input,
@@ -55,7 +55,7 @@ index e11e24378e6..950a2cdce22 100644
{
const struct rawinput_device *device;
struct hardware_msg_data *msg_data;
@@ -1870,7 +1870,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -1849,7 +1849,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
y = desktop->cursor.y;
}
@@ -64,7 +64,7 @@ index e11e24378e6..950a2cdce22 100644
{
memset( &raw_msg, 0, sizeof(raw_msg) );
raw_msg.foreground = foreground;
@@ -1929,7 +1929,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -1908,7 +1908,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
/* queue a hardware message for a keyboard event */
static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input,
@@ -73,7 +73,7 @@ index e11e24378e6..950a2cdce22 100644
{
struct hw_msg_source source = { IMDT_KEYBOARD, origin };
const struct rawinput_device *device;
@@ -2007,7 +2007,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
@@ -1986,7 +1986,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
break;
}
@@ -82,7 +82,7 @@ index e11e24378e6..950a2cdce22 100644
{
memset( &raw_msg, 0, sizeof(raw_msg) );
raw_msg.foreground = foreground;
@@ -2641,10 +2641,10 @@ DECL_HANDLER(send_hardware_message)
@@ -2617,10 +2617,10 @@ DECL_HANDLER(send_hardware_message)
switch (req->input.type)
{
case INPUT_MOUSE:
@@ -96,5 +96,5 @@ index e11e24378e6..950a2cdce22 100644
case INPUT_HARDWARE:
queue_custom_hardware_message( desktop, req->win, origin, &req->input );
--
2.35.1
2.39.2

View File

@@ -1,4 +1,4 @@
From b2f68f427f6fc486238b768c664ed6df6009a5ef Mon Sep 17 00:00:00 2001
From aabf00b3648c3ac7573d2ddffdb95bb98aed2616 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Wed, 24 Mar 2021 23:29:28 +0100
Subject: [PATCH] user32: Set SEND_HWMSG_RAWINPUT flags only when RAWINPUT is
@@ -20,7 +20,7 @@ __wine_send_input with INPUT_HARDWARE input type and a rawinput.
9 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index afd352e1fbd..2442aa49053 100644
index a8b938066ff..b89869b141c 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -613,6 +613,7 @@ UINT WINAPI NtUserSendInput( UINT count, INPUT *inputs, int size )
@@ -41,27 +41,27 @@ index afd352e1fbd..2442aa49053 100644
case INPUT_HARDWARE:
RtlSetLastWin32Error( ERROR_CALL_NOT_IMPLEMENTED );
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c
index 56a23a95e71..7b0004dfb96 100644
index bad69c18142..3c4c12d1c7f 100644
--- a/dlls/win32u/message.c
+++ b/dlls/win32u/message.c
@@ -2623,7 +2623,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
@@ -2627,7 +2627,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
req->input.mouse.flags = input->mi.dwFlags;
req->input.mouse.time = input->mi.time;
req->input.mouse.info = input->mi.dwExtraInfo;
- req->flags |= SEND_HWMSG_RAWINPUT;
+ if (rawinput) req->flags |= SEND_HWMSG_RAWINPUT;
break;
case INPUT_KEYBOARD:
req->input.kbd.vkey = input->ki.wVk;
@@ -2631,7 +2631,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
affects_key_state = !!(input->mi.dwFlags & (MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP |
MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP |
MOUSEEVENTF_MIDDLEDOWN | MOUSEEVENTF_MIDDLEUP |
@@ -2639,7 +2639,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
req->input.kbd.flags = input->ki.dwFlags;
req->input.kbd.time = input->ki.time;
req->input.kbd.info = input->ki.dwExtraInfo;
- req->flags |= SEND_HWMSG_RAWINPUT;
+ if (rawinput) req->flags |= SEND_HWMSG_RAWINPUT;
affects_key_state = TRUE;
break;
case INPUT_HARDWARE:
req->input.hw.msg = input->hi.uMsg;
diff --git a/dlls/wineandroid.drv/keyboard.c b/dlls/wineandroid.drv/keyboard.c
index 7c55c481353..9a20daf8809 100644
--- a/dlls/wineandroid.drv/keyboard.c
@@ -84,7 +84,7 @@ index 7c55c481353..9a20daf8809 100644
/***********************************************************************
diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c
index a339c20ceda..222751abc29 100644
index f01df37a400..eb96300da89 100644
--- a/dlls/wineandroid.drv/window.c
+++ b/dlls/wineandroid.drv/window.c
@@ -424,6 +424,7 @@ static int process_events( DWORD mask )
@@ -189,10 +189,10 @@ index cb194095d55..74c329488c4 100644
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index 5b1b892de32..622024dcdd9 100644
index 5d02da68313..0a74a7c603d 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1134,6 +1134,7 @@ static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e)
@@ -1123,6 +1123,7 @@ static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e)
*/
static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, UINT flags, UINT time )
{
@@ -200,7 +200,7 @@ index 5b1b892de32..622024dcdd9 100644
INPUT input;
TRACE_(key)( "hwnd %p vkey=%04x scan=%04x flags=%04x\n", hwnd, vkey, scan, flags );
@@ -1145,7 +1146,7 @@ static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, UINT fl
@@ -1134,7 +1135,7 @@ static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, UINT fl
input.u.ki.time = time;
input.u.ki.dwExtraInfo = 0;
@@ -210,10 +210,10 @@ index 5b1b892de32..622024dcdd9 100644
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 82a82032957..17e88f87982 100644
index e25b3e7728a..bb9807bf850 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -750,6 +750,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
@@ -749,6 +749,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
{
struct x11drv_win_data *data;
Window win = 0;
@@ -221,7 +221,7 @@ index 82a82032957..17e88f87982 100644
input->type = INPUT_MOUSE;
@@ -766,7 +767,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
@@ -765,7 +766,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
sync_window_cursor( window );
last_cursor_change = input->u.mi.time;
}
@@ -230,7 +230,7 @@ index 82a82032957..17e88f87982 100644
return;
}
@@ -807,7 +808,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
@@ -806,7 +807,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
SERVER_END_REQ;
}
@@ -239,7 +239,7 @@ index 82a82032957..17e88f87982 100644
}
#ifdef SONAME_LIBXCURSOR
@@ -1790,6 +1791,7 @@ void move_resize_window( HWND hwnd, int dir )
@@ -1789,6 +1790,7 @@ void move_resize_window( HWND hwnd, int dir )
{
MSG msg;
INPUT input;
@@ -247,7 +247,7 @@ index 82a82032957..17e88f87982 100644
int x, y, rootX, rootY;
if (!XQueryPointer( display, root_window, &root, &child, &rootX, &rootY, &x, &y, &xstate )) break;
@@ -1805,7 +1807,7 @@ void move_resize_window( HWND hwnd, int dir )
@@ -1804,7 +1806,7 @@ void move_resize_window( HWND hwnd, int dir )
input.u.mi.dwFlags = button_up_flags[button - 1] | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
input.u.mi.time = NtGetTickCount();
input.u.mi.dwExtraInfo = 0;
@@ -256,7 +256,7 @@ index 82a82032957..17e88f87982 100644
}
while (NtUserPeekMessage( &msg, 0, 0, 0, PM_REMOVE ))
@@ -2018,6 +2020,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
@@ -2017,6 +2019,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
{
XIRawEvent *event = xev->data;
@@ -264,7 +264,7 @@ index 82a82032957..17e88f87982 100644
INPUT input;
if (broken_rawevents && is_old_motion_event( xev->serial ))
@@ -2035,7 +2038,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
@@ -2034,7 +2037,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
input.u.mi.dy = 0;
if (!map_raw_event_coords( event, &input )) return FALSE;
@@ -274,5 +274,5 @@ index 82a82032957..17e88f87982 100644
}
--
2.39.1
2.39.2

View File

@@ -0,0 +1,199 @@
From 84aac220084db0058e68e5800992842179fef4f6 Mon Sep 17 00:00:00 2001
From: Ben Shefte <shefben@gmail.com>
Date: Wed, 1 Mar 2023 07:37:52 +1100
Subject: [PATCH] vcomp: Implement _vcomp_for_dynamic_init_i8
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52012
---
dlls/vcomp/main.c | 135 ++++++++++++++++++++++++++++++++++++++++++
dlls/vcomp/vcomp.spec | 6 +-
2 files changed, 138 insertions(+), 3 deletions(-)
diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c
index 374adf3991a..faa863d3ea4 100644
--- a/dlls/vcomp/main.c
+++ b/dlls/vcomp/main.c
@@ -1031,6 +1031,26 @@ double CDECL omp_get_wtime(void)
return GetTickCount() / 1000.0;
}
+/*****************************************************
+* omp_get_wtick - Taken from:
+* https://gist.github.com/Randl/45bcca59720f661fa033a67d5f44bff0
+*/
+double CDECL omp_get_wtick (void)
+{
+ /*return GetTickCount();*/
+ FILETIME createTime;
+ FILETIME exitTime;
+ FILETIME kernelTime;
+ FILETIME userTime;
+ ULARGE_INTEGER li;
+
+ GetProcessTimes(GetCurrentProcess(), &createTime, &exitTime, &kernelTime, &userTime);
+ li.LowPart = userTime.dwLowDateTime;
+ li.HighPart = userTime.dwHighDateTime;
+
+ return (double)li.QuadPart / 10000000.0;
+}
+
void CDECL omp_set_dynamic(int val)
{
TRACE("(%d): stub\n", val);
@@ -1483,6 +1503,77 @@ void CDECL _vcomp_for_dynamic_init(unsigned int flags, unsigned int first, unsig
}
}
+void CDECL _vcomp_for_dynamic_init_i8(ULONG64 flags, ULONG64 first, ULONG64 last,
+ ULONG64 step, ULONG64 chunksize)
+{
+ ULONG64 iterations, per_thread, remaining;
+ struct vcomp_thread_data *thread_data = vcomp_init_thread_data();
+ struct vcomp_team_data *team_data = thread_data->team;
+ struct vcomp_task_data *task_data = thread_data->task;
+ LONG64 num_threads = team_data ? team_data->num_threads : 1;
+ LONG64 thread_num = thread_data->thread_num;
+ unsigned int type = flags & ~VCOMP_DYNAMIC_FLAGS_INCREMENT;
+
+ TRACE("(%llu, %llu, %llu, %lld, %llu)\n", flags, first, last, step, chunksize);
+
+ if (step <= 0)
+ {
+ thread_data->dynamic_type = 0;
+ return;
+ }
+
+ if (flags & VCOMP_DYNAMIC_FLAGS_INCREMENT)
+ iterations = 1 + (last - first) / step;
+ else
+ {
+ iterations = 1 + (first - last) / step;
+ step *= -1;
+ }
+
+ if (type == VCOMP_DYNAMIC_FLAGS_STATIC)
+ {
+ per_thread = iterations / num_threads;
+ remaining = iterations - per_thread * num_threads;
+
+ if (thread_num < remaining)
+ per_thread++;
+ else if (per_thread)
+ first += remaining * step;
+ else
+ {
+ thread_data->dynamic_type = 0;
+ return;
+ }
+
+ thread_data->dynamic_type = VCOMP_DYNAMIC_FLAGS_STATIC;
+ thread_data->dynamic_begin = first + per_thread * thread_num * step;
+ thread_data->dynamic_end = thread_data->dynamic_begin + (per_thread - 1) * step;
+ }
+ else
+ {
+ if (type != VCOMP_DYNAMIC_FLAGS_CHUNKED &&
+ type != VCOMP_DYNAMIC_FLAGS_GUIDED)
+ {
+ FIXME("unsupported flags %llu\n", flags);
+ type = VCOMP_DYNAMIC_FLAGS_GUIDED;
+ }
+
+ EnterCriticalSection(&vcomp_section);
+ thread_data->dynamic++;
+ thread_data->dynamic_type = type;
+ if ((LONG64)(thread_data->dynamic - task_data->dynamic) > 0)
+ {
+ task_data->dynamic = thread_data->dynamic;
+ task_data->dynamic_first = first;
+ task_data->dynamic_last = last;
+ task_data->dynamic_iterations = iterations;
+ task_data->dynamic_step = step;
+ task_data->dynamic_chunksize = chunksize;
+ }
+ LeaveCriticalSection(&vcomp_section);
+ }
+}
+
int CDECL _vcomp_for_dynamic_next(unsigned int *begin, unsigned int *end)
{
struct vcomp_thread_data *thread_data = vcomp_init_thread_data();
@@ -1527,6 +1618,50 @@ int CDECL _vcomp_for_dynamic_next(unsigned int *begin, unsigned int *end)
return 0;
}
+LONG64 CDECL _vcomp_for_dynamic_next_i8(LONG64 *begin, LONG64 *end)
+{
+ struct vcomp_thread_data *thread_data = vcomp_init_thread_data();
+ struct vcomp_task_data *task_data = thread_data->task;
+ struct vcomp_team_data *team_data = thread_data->team;
+ LONG64 num_threads = team_data ? team_data->num_threads : 1;
+
+ TRACE("(%p, %p)\n", begin, end);
+
+ if (thread_data->dynamic_type == VCOMP_DYNAMIC_FLAGS_STATIC)
+ {
+ *begin = thread_data->dynamic_begin;
+ *end = thread_data->dynamic_end;
+ thread_data->dynamic_type = 0;
+ return 1;
+ }
+ else if (thread_data->dynamic_type == VCOMP_DYNAMIC_FLAGS_CHUNKED ||
+ thread_data->dynamic_type == VCOMP_DYNAMIC_FLAGS_GUIDED)
+ {
+ unsigned int iterations = 0;
+ EnterCriticalSection(&vcomp_section);
+ if (thread_data->dynamic == task_data->dynamic &&
+ task_data->dynamic_iterations != 0)
+ {
+ iterations = min(task_data->dynamic_iterations, task_data->dynamic_chunksize);
+ if (thread_data->dynamic_type == VCOMP_DYNAMIC_FLAGS_GUIDED &&
+ task_data->dynamic_iterations > num_threads * task_data->dynamic_chunksize)
+ {
+ iterations = (task_data->dynamic_iterations + num_threads - 1) / num_threads;
+ }
+ *begin = task_data->dynamic_first;
+ *end = task_data->dynamic_first + (iterations - 1) * task_data->dynamic_step;
+ task_data->dynamic_iterations -= iterations;
+ task_data->dynamic_first += iterations * task_data->dynamic_step;
+ if (!task_data->dynamic_iterations)
+ *end = task_data->dynamic_last;
+ }
+ LeaveCriticalSection(&vcomp_section);
+ return iterations != 0;
+ }
+
+ return 0;
+}
+
int CDECL omp_in_parallel(void)
{
TRACE("()\n");
diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec
index fb67146e058..09bf45550d5 100644
--- a/dlls/vcomp/vcomp.spec
+++ b/dlls/vcomp/vcomp.spec
@@ -56,9 +56,9 @@
@ cdecl _vcomp_enter_critsect(ptr)
@ cdecl _vcomp_flush()
@ cdecl _vcomp_for_dynamic_init(long long long long long)
-@ stub _vcomp_for_dynamic_init_i8
+@ cdecl -arch=win64 _vcomp_for_dynamic_init_i8(int64 int64 int64 int64 int64)
@ cdecl _vcomp_for_dynamic_next(ptr ptr)
-@ stub _vcomp_for_dynamic_next_i8
+@ cdecl -arch=win64 _vcomp_for_dynamic_next_i8(ptr ptr)
@ cdecl _vcomp_for_static_end()
@ cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr)
@ cdecl _vcomp_for_static_init_i8(int64 int64 int64 int64 ptr ptr ptr ptr ptr)
@@ -96,7 +96,7 @@
@ cdecl omp_get_num_procs()
@ cdecl omp_get_num_threads()
@ cdecl omp_get_thread_num()
-@ stub omp_get_wtick
+@ cdecl omp_get_wtick()
@ cdecl omp_get_wtime()
@ cdecl omp_in_parallel()
@ cdecl omp_init_lock(ptr)
--
2.39.2

Some files were not shown because too many files have changed in this diff Show More