Compare commits

...

22 Commits
v4.2 ... v4.3

Author SHA1 Message Date
Alistair Leslie-Hughes
923434cd32 Release v4.3 2019-03-03 16:51:57 +11:00
Alistair Leslie-Hughes
f419a53698 Added xaudio2-revert patchset 2019-03-03 16:46:30 +11:00
Zebediah Figura
5e8beb5ff2 Rebase against 1e8f4c059befe4a026ddf5c56e81d720b35c6c2f. 2019-02-28 22:32:39 -06:00
Alistair Leslie-Hughes
37de066533 Revert "Added msasn1-ASN1_CreateModule patchset"
This reverts commit 06ad40cfd0.

It come to out attention that FreeRDP may not be a clean source
for this patch.
2019-03-01 08:08:25 +11:00
Alistair Leslie-Hughes
e108b600b5 Added comctrl-rebar-capture patchset 2019-02-28 16:28:45 +11:00
Alistair Leslie-Hughes
06ad40cfd0 Added msasn1-ASN1_CreateModule patchset 2019-02-28 16:28:39 +11:00
Alistair Leslie-Hughes
bd8f790f9b Added dinput-axis-recalc patchset 2019-02-28 16:22:05 +11:00
Alistair Leslie-Hughes
4a23a62b5d Added dinput-reconnect-joystick patchset 2019-02-28 15:30:07 +11:00
Alistair Leslie-Hughes
e6cfe1ccd8 Added dinput-remap-joystick patchset 2019-02-28 15:30:07 +11:00
Zebediah Figura
b50c875c39 setupapi-Display_Device: Correct rebase. 2019-02-27 21:01:33 -06:00
Zebediah Figura
b02bd9c446 wined3d-SWVP-shaders, wined3d-Indexed_Vertex_Blending: Add new patch sets from Paul Gofman. 2019-02-27 20:27:16 -06:00
Alistair Leslie-Hughes
7c1618b197 Rebase against 474a6771ba03e2c475cd088ff40c97e8285a455f 2019-02-27 12:51:15 +11:00
Alistair Leslie-Hughes
733fa5c485 Rebase against f784cabd3489b20c13afd80fddbbcf5aa1b656b3 2019-02-26 08:54:19 +11:00
Zebediah Figura
b74293fbfe Rebase against b3c5b7da9442af840431cd7f795da20989aad42a. 2019-02-22 22:45:29 -06:00
Alistair Leslie-Hughes
38aa047cad Rebase against 812d03129dea53337367789bac8ab523b9fce21d 2019-02-22 08:51:56 +11:00
Alistair Leslie-Hughes
778998c66e Rebase against c0cc126d579e078f2804112c14f0c18b38f68937 2019-02-21 13:49:36 +11:00
Zebediah Figura
d12fcebb0e ntoskrnl.exe-Resources: Add patch set. 2019-02-19 19:03:35 -06:00
Zebediah Figura
7937739028 ntdll-MemoryWorkingSetExInformation: Add patch. 2019-02-19 18:48:47 -06:00
Zebediah Figura
13b580a0c8 Rebase against 0c738d900a8daccf2c5460972033766d34d59aed. 2019-02-19 18:36:59 -06:00
Alistair Leslie-Hughes
b3c99ebf4b Rebase against 5e86cc0a8f37295072b03b1c13aa205ff3e6f3e4 2019-02-19 11:35:04 +11:00
Alistair Leslie-Hughes
87578b4c82 Updated httpapi-HttpCreateServerSession patchset
Thanks Gijs Vermeulen.
2019-02-19 08:30:45 +11:00
Alistair Leslie-Hughes
be81b6245c Added wmvcore-WMCreateSyncReader patchset 2019-02-18 13:58:09 +11:00
120 changed files with 13882 additions and 6398 deletions

View File

@@ -0,0 +1,35 @@
From 37c7da9a71e327dfe86c0c550cabc50968abd04d Mon Sep 17 00:00:00 2001
From: Andrew Shadura <bugzilla@tut.by>
Date: Fri, 1 Feb 2019 08:38:10 +1100
Subject: [PATCH] comctl32: Fixed rebar behaviour when there's capture and no
drag
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=14750
---
dlls/comctl32/rebar.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index aaa1047..29fc854 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -3119,7 +3119,15 @@ REBAR_MouseMove (REBAR_INFO *infoPtr, LPARAM lParam)
int yPtMove = (infoPtr->dwStyle & CCS_VERT ? ptMove.x : ptMove.y);
if (GetCapture() != infoPtr->hwndSelf)
- ERR("We are dragging but haven't got capture?!?\n");
+ {
+ if (infoPtr->fStatus & BEGIN_DRAG_ISSUED)
+ {
+ REBAR_Notify_NMREBAR (infoPtr, infoPtr->iGrabbedBand, RBN_ENDDRAG);
+ infoPtr->fStatus &= ~BEGIN_DRAG_ISSUED;
+ }
+ infoPtr->iGrabbedBand = -1;
+ return 0;
+ }
band = REBAR_GetBand(infoPtr, infoPtr->iGrabbedBand);
--
1.9.1

View File

@@ -0,0 +1 @@
Fixes: [14750] comctl32: Fixed rebar behaviour when there's capture and no drag.

View File

@@ -0,0 +1,214 @@
From b5311918d5fbdc15b3321fed444daa0d0c8507de Mon Sep 17 00:00:00 2001
From: Bruno Jesus <bjesus@codeweavers.com>
Date: Thu, 28 Feb 2019 15:56:18 +1100
Subject: [PATCH] dinput: Recalculated Axis after deadzone change.
Wine-bugs: https://bugs.winehq.org/show_bug.cgi?id=41317
---
dlls/dinput/joystick.c | 149 ++++++++++++++++++++++++++-----------------------
1 file changed, 80 insertions(+), 69 deletions(-)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 0ec1ceb..fd3d44d 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -271,6 +271,76 @@ BOOL device_disabled_registry(const char* name)
return do_disable;
}
+static void remap_init(JoystickGenericImpl *This, int obj, ObjProps *remap_props)
+{
+ /* Configure as if nothing changed so the helper functions can only change
+ * what they need, thus reducing code duplication. */
+ remap_props->lDevMin = remap_props->lMin = This->props[obj].lMin;
+ remap_props->lDevMax = remap_props->lMax = This->props[obj].lMax;
+
+ remap_props->lDeadZone = This->props[obj].lDeadZone;
+ remap_props->lSaturation = This->props[obj].lSaturation;
+}
+
+static void remap_apply(JoystickGenericImpl *This, int obj, ObjProps *remap_props)
+{
+ /* Many games poll the joystick immediately after setting the range
+ * for calibration purposes, so the old values need to be remapped
+ * to the new range before it does so */
+ switch (This->base.data_format.wine_df->rgodf[obj].dwOfs){
+ case DIJOFS_X : This->js.lX = joystick_map_axis(remap_props, This->js.lX); break;
+ case DIJOFS_Y : This->js.lY = joystick_map_axis(remap_props, This->js.lY); break;
+ case DIJOFS_Z : This->js.lZ = joystick_map_axis(remap_props, This->js.lZ); break;
+ case DIJOFS_RX : This->js.lRx = joystick_map_axis(remap_props, This->js.lRx); break;
+ case DIJOFS_RY : This->js.lRy = joystick_map_axis(remap_props, This->js.lRy); break;
+ case DIJOFS_RZ : This->js.lRz = joystick_map_axis(remap_props, This->js.lRz); break;
+ case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(remap_props, This->js.rglSlider[0]); break;
+ case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(remap_props, This->js.rglSlider[1]); break;
+ default: break;
+ }
+}
+
+static void remap_range(JoystickGenericImpl *This, int obj, LPCDIPROPRANGE pr)
+{
+ ObjProps remap_props;
+ remap_init(This, obj, &remap_props);
+
+ remap_props.lMin = pr->lMin;
+ remap_props.lMax = pr->lMax;
+
+ remap_apply(This, obj, &remap_props);
+
+ /* Store new values */
+ This->props[obj].lMin = pr->lMin;
+ This->props[obj].lMax = pr->lMax;
+}
+
+static void remap_deadzone(JoystickGenericImpl *This, int obj, LPCDIPROPDWORD pd)
+{
+ ObjProps remap_props;
+ remap_init(This, obj, &remap_props);
+
+ remap_props.lDeadZone = pd->dwData;
+
+ remap_apply(This, obj, &remap_props);
+
+ /* Store new value */
+ This->props[obj].lDeadZone = pd->dwData;
+}
+
+static void remap_saturation(JoystickGenericImpl *This, int obj, LPCDIPROPDWORD pd)
+{
+ ObjProps remap_props;
+ remap_init(This, obj, &remap_props);
+
+ remap_props.lSaturation = pd->dwData;
+
+ remap_apply(This, obj, &remap_props);
+
+ /* Store new value */
+ This->props[obj].lSaturation = pd->dwData;
+}
+
/******************************************************************************
* SetProperty : change input device properties
*/
@@ -278,7 +348,6 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
{
JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface);
DWORD i;
- ObjProps remap_props;
TRACE("(%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
@@ -295,69 +364,15 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
case (DWORD_PTR)DIPROP_RANGE: {
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
if (ph->dwHow == DIPH_DEVICE) {
-
- /* Many games poll the joystick immediately after setting the range
- * for calibration purposes, so the old values need to be remapped
- * to the new range before it does so */
-
TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax);
- for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) {
-
- remap_props.lDevMin = This->props[i].lMin;
- remap_props.lDevMax = This->props[i].lMax;
-
- remap_props.lDeadZone = This->props[i].lDeadZone;
- remap_props.lSaturation = This->props[i].lSaturation;
-
- remap_props.lMin = pr->lMin;
- remap_props.lMax = pr->lMax;
-
- switch (This->base.data_format.wine_df->rgodf[i].dwOfs) {
- case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break;
- case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break;
- case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break;
- case DIJOFS_RX : This->js.lRx = joystick_map_axis(&remap_props, This->js.lRx); break;
- case DIJOFS_RY : This->js.lRy = joystick_map_axis(&remap_props, This->js.lRy); break;
- case DIJOFS_RZ : This->js.lRz = joystick_map_axis(&remap_props, This->js.lRz); break;
- case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(&remap_props, This->js.rglSlider[0]); break;
- case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(&remap_props, This->js.rglSlider[1]); break;
- default: break;
- }
-
- This->props[i].lMin = pr->lMin;
- This->props[i].lMax = pr->lMax;
- }
+ for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++)
+ remap_range(This, i, pr);
} else {
int obj = find_property(&This->base.data_format, ph);
TRACE("proprange(%d,%d) obj=%d\n", pr->lMin, pr->lMax, obj);
- if (obj >= 0) {
-
- remap_props.lDevMin = This->props[obj].lMin;
- remap_props.lDevMax = This->props[obj].lMax;
-
- remap_props.lDeadZone = This->props[obj].lDeadZone;
- remap_props.lSaturation = This->props[obj].lSaturation;
-
- remap_props.lMin = pr->lMin;
- remap_props.lMax = pr->lMax;
-
- switch (This->base.data_format.wine_df->rgodf[obj].dwOfs) {
- case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break;
- case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break;
- case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break;
- case DIJOFS_RX : This->js.lRx = joystick_map_axis(&remap_props, This->js.lRx); break;
- case DIJOFS_RY : This->js.lRy = joystick_map_axis(&remap_props, This->js.lRy); break;
- case DIJOFS_RZ : This->js.lRz = joystick_map_axis(&remap_props, This->js.lRz); break;
- case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(&remap_props, This->js.rglSlider[0]); break;
- case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(&remap_props, This->js.rglSlider[1]); break;
- default: break;
- }
-
- This->props[obj].lMin = pr->lMin;
- This->props[obj].lMax = pr->lMax;
- return DI_OK;
- }
+ if (obj >= 0)
+ remap_range(This, obj, pr);
}
break;
}
@@ -366,15 +381,13 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
if (ph->dwHow == DIPH_DEVICE) {
TRACE("deadzone(%d) all\n", pd->dwData);
for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++)
- This->props[i].lDeadZone = pd->dwData;
+ remap_deadzone(This, i, pd);
} else {
int obj = find_property(&This->base.data_format, ph);
TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj);
- if (obj >= 0) {
- This->props[obj].lDeadZone = pd->dwData;
- return DI_OK;
- }
+ if (obj >= 0)
+ remap_deadzone(This, obj, pd);
}
break;
}
@@ -383,15 +396,13 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
if (ph->dwHow == DIPH_DEVICE) {
TRACE("saturation(%d) all\n", pd->dwData);
for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++)
- This->props[i].lSaturation = pd->dwData;
+ remap_saturation(This, i, pd);
} else {
int obj = find_property(&This->base.data_format, ph);
TRACE("saturation(%d) obj=%d\n", pd->dwData, obj);
- if (obj >= 0) {
- This->props[obj].lSaturation = pd->dwData;
- return DI_OK;
- }
+ if (obj >= 0)
+ remap_saturation(This, obj, pd);
}
break;
}
--
1.9.1

View File

@@ -0,0 +1 @@
Fixes: [41317] dinput: Recalculated Axis after deadzone change.

View File

@@ -0,0 +1,240 @@
From 47a1e3618a1629a6f7cca1b84f761eaab3627f75 Mon Sep 17 00:00:00 2001
From: Andrew Church <achurch@achurch.org>
Date: Mon, 25 Feb 2019 11:23:12 +1100
Subject: [PATCH] dinput: Allow reconnecting to disconnected joysticks
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=34297
---
dlls/dinput/joystick_linuxinput.c | 148 +++++++++++++++++++++++++++++---------
1 file changed, 113 insertions(+), 35 deletions(-)
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index ace4641..233dd25 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -83,6 +83,13 @@ struct wine_input_absinfo {
LONG flat;
};
+enum wine_joystick_linuxinput_fd_state {
+ WINE_FD_STATE_CLOSED = 0, /* No device has been opened yet */
+ WINE_FD_STATE_OK, /* File descriptor is open and ready for reading */
+ WINE_FD_STATE_DISCONNECTED, /* Read error occurred; might be able to reopen later */
+ WINE_FD_STATE_INVALID, /* Device is no longer available at original pathname */
+};
+
/* implemented in effect_linuxinput.c */
HRESULT linuxinput_create_effect(int* fd, REFGUID rguid, struct list *parent_list_entry, LPDIRECTINPUTEFFECT* peff);
HRESULT linuxinput_get_info_A(int fd, REFGUID rguid, LPDIEFFECTINFOA info);
@@ -122,6 +129,7 @@ struct JoystickImpl
/* joystick private */
int joyfd;
+ enum wine_joystick_linuxinput_fd_state joyfd_state;
int dev_axes_to_di[ABS_MAX];
POINTL povs[4];
@@ -466,6 +474,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig
newDevice->generic.base.dinput = dinput;
newDevice->generic.joy_polldev = joy_polldev;
newDevice->joyfd = -1;
+ newDevice->joyfd_state = WINE_FD_STATE_CLOSED;
newDevice->joydev = &joydevs[index];
newDevice->generic.name = newDevice->joydev->name;
list_init(&newDevice->ff_effects);
@@ -669,38 +678,15 @@ static HRESULT joydev_create_device(IDirectInputImpl *dinput, REFGUID rguid, REF
return DIERR_DEVICENOTREG;
}
-
-const struct dinput_device joystick_linuxinput_device = {
- "Wine Linux-input joystick driver",
- joydev_enum_deviceA,
- joydev_enum_deviceW,
- joydev_create_device
-};
-
-/******************************************************************************
- * Acquire : gets exclusive control of the joystick
- */
-static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
+static int joydev_open_evdev(JoystickImpl *This)
{
- JoystickImpl *This = impl_from_IDirectInputDevice8W(iface);
- HRESULT res;
-
- TRACE("(this=%p)\n",This);
+ int fd;
- if ((res = IDirectInputDevice2WImpl_Acquire(iface)) != DI_OK)
+ if ((fd = open(This->joydev->device, O_RDWR)) == -1)
{
- WARN("Failed to acquire: %x\n", res);
- return res;
- }
-
- if ((This->joyfd = open(This->joydev->device, O_RDWR)) == -1)
- {
- if ((This->joyfd = open(This->joydev->device, O_RDONLY)) == -1)
+ if ((fd = open(This->joydev->device, O_RDONLY)) == -1)
{
/* Couldn't open the device at all */
- ERR("Failed to open device %s: %d %s\n", This->joydev->device, errno, strerror(errno));
- IDirectInputDevice2WImpl_Unacquire(iface);
- return DIERR_NOTFOUND;
}
else
{
@@ -715,18 +701,53 @@ static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
event.type = EV_FF;
event.code = FF_GAIN;
event.value = This->ff_gain;
- if (write(This->joyfd, &event, sizeof(event)) == -1)
+ if (write(fd, &event, sizeof(event)) == -1)
ERR("Failed to set gain (%i): %d %s\n", This->ff_gain, errno, strerror(errno));
if (!This->ff_autocenter)
{
/* Disable autocenter. */
event.code = FF_AUTOCENTER;
event.value = 0;
- if (write(This->joyfd, &event, sizeof(event)) == -1)
+ if (write(fd, &event, sizeof(event)) == -1)
ERR("Failed disabling autocenter: %d %s\n", errno, strerror(errno));
}
}
+ return fd;
+}
+
+
+const struct dinput_device joystick_linuxinput_device = {
+ "Wine Linux-input joystick driver",
+ joydev_enum_deviceA,
+ joydev_enum_deviceW,
+ joydev_create_device
+};
+
+/******************************************************************************
+ * Acquire : gets exclusive control of the joystick
+ */
+static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
+{
+ JoystickImpl *This = impl_from_IDirectInputDevice8W(iface);
+ HRESULT res;
+
+ TRACE("(this=%p)\n",This);
+
+ if ((res = IDirectInputDevice2WImpl_Acquire(iface)) != DI_OK)
+ {
+ WARN("Failed to acquire: %x\n", res);
+ return res;
+ }
+
+ if ((This->joyfd = joydev_open_evdev(This)) == -1)
+ {
+ ERR("Failed to open device %s: %d %s\n", This->joydev->device, errno, strerror(errno));
+ IDirectInputDevice2WImpl_Unacquire(iface);
+ return DIERR_NOTFOUND;
+ }
+
+ This->joyfd_state = WINE_FD_STATE_OK;
return DI_OK;
}
@@ -764,6 +785,7 @@ static HRESULT WINAPI JoystickWImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface)
close(This->joyfd);
This->joyfd = -1;
+ This->joyfd_state = WINE_FD_STATE_CLOSED;
}
return res;
}
@@ -808,23 +830,79 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
struct input_event ie;
JoystickImpl *This = impl_from_IDirectInputDevice8A(iface);
- if (This->joyfd==-1)
- return;
+ if (This->joyfd == -1)
+ {
+ int fd;
+ char namebuf[MAX_PATH + 8]; /* 8 == strlen(EVDEVDRIVER) */
+
+ if (This->joyfd_state != WINE_FD_STATE_DISCONNECTED)
+ return;
+ /* Try to reconnect to the device. */
+ fd = joydev_open_evdev(This);
+ if (fd == -1)
+ return;
+ namebuf[sizeof(namebuf) - strlen(EVDEVDRIVER) - 1] = 0;
+ if (ioctl(fd, EVIOCGNAME(sizeof(namebuf) - strlen(EVDEVDRIVER) - 1), namebuf) == -1)
+ {
+ /* Couldn't get the name; assume it's a different device. */
+ ERR("EVIOCGNAME(%s) failed: %d %s", This->joydev->device, errno, strerror(errno));
+ This->joyfd_state = WINE_FD_STATE_INVALID;
+ return;
+ }
+ strcat(namebuf, EVDEVDRIVER); /* Guaranteed to be safe. */
+ if (strcmp(namebuf, This->joydev->name) != 0)
+ {
+ ERR("Device %s changed from \"%s\" to \"%s\"! Can't reconnect.\n", This->joydev->device, This->joydev->name, namebuf);
+ This->joyfd_state = WINE_FD_STATE_INVALID;
+ return;
+ }
+ if (InterlockedCompareExchange(&This->joyfd, fd, -1) == -1)
+ {
+ This->joyfd_state = WINE_FD_STATE_OK;
+ TRACE("Reconnected to \"%s\" on %s", This->joydev->name, This->joydev->device);
+ }
+ else
+ {
+ /* Somebody beat us to it! Throw away our fd and use theirs. */
+ close(fd);
+ }
+ }
while (1)
{
LONG value = 0;
int inst_id = -1;
+ int result;
plfd.fd = This->joyfd;
plfd.events = POLLIN;
- if (poll(&plfd,1,0) != 1)
- return;
+ result = poll(&plfd,1,0);
+ if (result != 1)
+ {
+ if (result == -1)
+ {
+ ERR("poll failed: %d %s\n", errno, strerror(errno));
+ close(This->joyfd);
+ This->joyfd = -1;
+ This->joyfd_state = WINE_FD_STATE_DISCONNECTED;
+ }
+ return;
+ }
/* we have one event, so we can read */
- if (sizeof(ie)!=read(This->joyfd,&ie,sizeof(ie)))
- return;
+ result = read(This->joyfd,&ie,sizeof(ie));
+ if (result != sizeof(ie))
+ {
+ if (result == -1)
+ {
+ ERR("read failed: %d %s\n", errno, strerror(errno));
+ close(This->joyfd);
+ This->joyfd = -1;
+ This->joyfd_state = WINE_FD_STATE_DISCONNECTED;
+ }
+ return;
+ }
TRACE("input_event: type %d, code %d, value %d\n",ie.type,ie.code,ie.value);
switch (ie.type) {
--
1.9.1

View File

@@ -0,0 +1,2 @@
Fixes: [34297] dinput: Allow reconnecting to disconnected joysticks

View File

@@ -0,0 +1,136 @@
From 0ea096d60ff87cbab644fce6b2115be749b28e51 Mon Sep 17 00:00:00 2001
From: Andrew Church <achurch@achurch.org>
Date: Mon, 25 Feb 2019 11:21:03 +1100
Subject: [PATCH] dinput: Allow remapping of joystick buttons
Changed
- Change the array to store the origial button.
- Remove lookup loops.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815
---
dlls/dinput/joystick.c | 29 +++++++++++++++++++++++++++++
dlls/dinput/joystick_linux.c | 7 +++++--
dlls/dinput/joystick_linuxinput.c | 2 ++
dlls/dinput/joystick_osx.c | 2 ++
dlls/dinput/joystick_private.h | 4 ++++
5 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 0ec1ceb..b8b0027 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -950,6 +950,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
int tokens = 0;
int axis = 0;
int pov = 0;
+ int button;
get_app_key(&hkey, &appkey);
@@ -961,6 +962,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
TRACE("setting default deadzone to: \"%s\" %d\n", buffer, This->deadzone);
}
+ for (button = 0; button < MAX_MAP_BUTTONS; button++)
+ This->button_map[button] = button;
+
+ if (!get_config_key(hkey, appkey, "ButtonMap", buffer, sizeof(buffer)))
+ {
+ static const char *delim = ",";
+ int button = 0;
+ char *token;
+
+ TRACE("ButtonMap = \"%s\"\n", buffer);
+ for (token = strtok(buffer, delim);
+ token != NULL && button < MAX_MAP_BUTTONS;
+ token = strtok(NULL, delim), button++)
+ {
+ char *s;
+ int value = strtol(token, &s, 10);
+ if (value < 0 || *s != '\0')
+ {
+ ERR("invalid button number: \"%s\"", token);
+ }
+ else
+ {
+ TRACE("mapping physical button %d to DInput button %d", value, button);
+ This->button_map[value] = button;
+ }
+ }
+ }
+
This->axis_map = HeapAlloc(GetProcessHeap(), 0, This->device_axis_count * sizeof(int));
if (!This->axis_map) return DIERR_OUTOFMEMORY;
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
index 963e62f..6286746 100644
--- a/dlls/dinput/joystick_linux.c
+++ b/dlls/dinput/joystick_linux.c
@@ -807,10 +807,13 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
jse.type,jse.number,jse.value);
if (jse.type & JS_EVENT_BUTTON)
{
+ int button;
if (jse.number >= This->generic.devcaps.dwButtons) return;
- inst_id = DIDFT_MAKEINSTANCE(jse.number) | DIDFT_PSHBUTTON;
- This->generic.js.rgbButtons[jse.number] = value = jse.value ? 0x80 : 0x00;
+ button = This->generic.button_map[jse.number];
+
+ inst_id = DIDFT_MAKEINSTANCE(button) | DIDFT_PSHBUTTON;
+ This->generic.js.rgbButtons[button] = value = jse.value ? 0x80 : 0x00;
}
else if (jse.type & JS_EVENT_AXIS)
{
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index 910e755..8ea268e 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -836,6 +836,8 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
if (btn & 0x80)
{
btn &= 0x7F;
+ btn = This->generic.button_map[btn];
+
inst_id = DIDFT_MAKEINSTANCE(btn) | DIDFT_PSHBUTTON;
This->generic.js.rgbButtons[btn] = value = ie.value ? 0x80 : 0x00;
}
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
index 0701b9f..224e203 100644
--- a/dlls/dinput/joystick_osx.c
+++ b/dlls/dinput/joystick_osx.c
@@ -809,6 +809,8 @@ static void poll_osx_device_state(LPDIRECTINPUTDEVICE8A iface)
TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal);
if (oldVal != newVal)
{
+ button_idx = device->generic.button_map[button_idx];
+
inst_id = DIDFT_MAKEINSTANCE(button_idx) | DIDFT_PSHBUTTON;
queue_event(iface,inst_id,newVal,GetCurrentTime(),device->generic.base.dinput->evsequence++);
}
diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h
index e758cac..8b4f203 100644
--- a/dlls/dinput/joystick_private.h
+++ b/dlls/dinput/joystick_private.h
@@ -33,6 +33,9 @@
#define MAX_PROPS 164
struct JoystickGenericImpl;
+/* Number of buttons for which to allow remapping */
+#define MAX_MAP_BUTTONS 16
+
typedef void joy_polldev_handler(LPDIRECTINPUTDEVICE8A iface);
typedef struct JoystickGenericImpl
@@ -47,6 +50,7 @@ typedef struct JoystickGenericImpl
char *name;
int device_axis_count; /* Total number of axes in the device */
int *axis_map; /* User axes remapping */
+ int button_map[MAX_MAP_BUTTONS]; /* User button remapping */
LONG deadzone; /* Default dead-zone */
joy_polldev_handler *joy_polldev;
--
1.9.1

View File

@@ -0,0 +1,2 @@
Fixes: [35815] dinput: Allow remapping of joystick buttons.

View File

@@ -1,16 +1,16 @@
From 93ec896e73fe1b9ad7100e4ea22086e940eb8ef4 Mon Sep 17 00:00:00 2001
From e84ed4d3b01ef570a0dc235822c3b4d159c78cb1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 15 Aug 2015 07:41:17 +0200
Subject: [PATCH] gdi32: Perform lazy initialization of fonts to improve
startup performance.
---
dlls/gdi32/dc.c | 8 +++-----
dlls/gdi32/freetype.c | 49 ++++++++++++++++++++++++++++++++++---------------
dlls/gdi32/dc.c | 8 +++----
dlls/gdi32/freetype.c | 49 ++++++++++++++++++++++++++++++-------------
2 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c
index 8ee8a52..208c220 100644
index 8ee8a52d..208c2202 100644
--- a/dlls/gdi32/dc.c
+++ b/dlls/gdi32/dc.c
@@ -148,11 +148,9 @@ DC *alloc_dc_ptr( WORD magic )
@@ -29,7 +29,7 @@ index 8ee8a52..208c220 100644
}
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 9f6bdfe..492d29e 100644
index 098faff3..fbdbf858 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -110,6 +110,9 @@
@@ -42,7 +42,7 @@ index 9f6bdfe..492d29e 100644
#ifdef HAVE_FREETYPE
#ifndef HAVE_FT_TRUETYPEENGINETYPE
@@ -3264,6 +3267,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
@@ -3266,6 +3269,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
{
INT ret = 0;
@@ -50,7 +50,7 @@ index 9f6bdfe..492d29e 100644
GDI_CheckNotLock();
if (ft_handle) /* do it only if we have freetype up and running */
@@ -3306,6 +3310,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
@@ -3308,6 +3312,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
*/
HANDLE WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts)
{
@@ -58,7 +58,7 @@ index 9f6bdfe..492d29e 100644
GDI_CheckNotLock();
if (ft_handle) /* do it only if we have freetype up and running */
@@ -3344,6 +3349,7 @@ BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
@@ -3346,6 +3351,7 @@ BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
{
INT ret = 0;
@@ -66,7 +66,7 @@ index 9f6bdfe..492d29e 100644
GDI_CheckNotLock();
if (ft_handle) /* do it only if we have freetype up and running */
@@ -3665,10 +3671,13 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
@@ -3667,10 +3673,13 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
BOOL WineEngCreateScalableFontResource( DWORD hidden, LPCWSTR resource,
LPCWSTR font_file, LPCWSTR font_path )
{
@@ -81,16 +81,16 @@ index 9f6bdfe..492d29e 100644
if (!unix_name || !get_fontdir( unix_name, &fontdir ))
SetLastError( ERROR_INVALID_PARAMETER );
else
@@ -4174,8 +4183,6 @@ static BOOL init_freetype(void)
FT_SimpleVersion = ((FT_Version.major << 16) & 0xff0000) |
((FT_Version.minor << 8) & 0x00ff00) |
((FT_Version.patch ) & 0x0000ff);
@@ -4184,8 +4193,6 @@ static BOOL init_freetype(void)
FT_UInt interpreter_version = 35;
pFT_Property_Set( library, "truetype", "interpreter-version", &interpreter_version );
}
-
- font_driver = &freetype_funcs;
return TRUE;
sym_not_found:
@@ -4361,21 +4368,13 @@ static void reorder_font_list(void)
@@ -4371,21 +4378,13 @@ static void reorder_font_list(void)
default_sans = set_default( default_sans_list );
}
@@ -114,7 +114,7 @@ index 9f6bdfe..492d29e 100644
#ifdef SONAME_LIBFONTCONFIG
init_fontconfig();
@@ -4401,7 +4400,7 @@ BOOL WineEngInit(void)
@@ -4411,7 +4410,7 @@ BOOL WineEngInit(void)
if((font_mutex = CreateMutexW(NULL, FALSE, font_mutex_nameW)) == NULL)
{
ERR("Failed to create font mutex\n");
@@ -123,7 +123,7 @@ index 9f6bdfe..492d29e 100644
}
WaitForSingleObject(font_mutex, INFINITE);
@@ -4428,6 +4427,21 @@ BOOL WineEngInit(void)
@@ -4438,6 +4437,21 @@ BOOL WineEngInit(void)
return TRUE;
}
@@ -145,7 +145,7 @@ index 9f6bdfe..492d29e 100644
/* Some fonts have large usWinDescent values, as a result of storing signed short
in unsigned field. That's probably caused by sTypoDescent vs usWinDescent confusion in
some font generation tools. */
@@ -5124,8 +5138,12 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
@@ -5180,8 +5194,12 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
static BOOL freetype_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
LPCWSTR output, const DEVMODEW *devmode )
{
@@ -159,7 +159,7 @@ index 9f6bdfe..492d29e 100644
if (!physdev) return FALSE;
push_dc_driver( dev, &physdev->dev, &freetype_funcs );
return TRUE;
@@ -8627,6 +8645,7 @@ static BOOL freetype_FontIsLinked( PHYSDEV dev )
@@ -8718,6 +8736,7 @@ static BOOL freetype_FontIsLinked( PHYSDEV dev )
*/
BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
{
@@ -168,5 +168,5 @@ index 9f6bdfe..492d29e 100644
lprs->wFlags = TT_AVAILABLE | TT_ENABLED;
lprs->nLanguageID = 0;
--
1.9.1
2.20.1

View File

@@ -1,15 +1,15 @@
From 99f4a556a733ff6036edbcde171beef389449d6f Mon Sep 17 00:00:00 2001
From 547a92d26b034a226b65a64aec229412129bdd61 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 27 May 2017 04:15:55 +0200
Subject: user32: Return a more reasonable display DeviceID.
Subject: [PATCH] user32: Return a more reasonable display DeviceID.
---
dlls/user32/misc.c | 7 ++++++-
dlls/user32/tests/monitor.c | 16 +++++++++++++---
2 files changed, 19 insertions(+), 4 deletions(-)
dlls/user32/tests/monitor.c | 12 ++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index 1898ce1b696..03114650348 100644
index a6b7644020f..c1c812dbd51 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -249,7 +249,12 @@ static const WCHAR adapter_device_deviceid[] = {'P','C','I','\\','V','E','N','_'
@@ -27,33 +27,18 @@ index 1898ce1b696..03114650348 100644
struct display_devices_enum_info
{
diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c
index dfdca49e792..886d63ccfe2 100644
index 8bf284a5e1c..6a886da1b63 100644
--- a/dlls/user32/tests/monitor.c
+++ b/dlls/user32/tests/monitor.c
@@ -89,12 +89,12 @@ static void test_enumdisplaydevices(void)
}
@@ -225,6 +225,7 @@ static void test_enumdisplaydevices(void)
int adapter_index;
int monitor_index;
BOOL ret;
+ int num;
dd.cb = sizeof(dd);
- while(1)
+ for (num = 0;; num++)
if (!pEnumDisplayDevicesA)
{
- BOOL ret;
HDC dc;
ret = pEnumDisplayDevicesA(NULL, num, &dd, 0);
if(!ret) break;
+
if(dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)
{
strcpy(primary_device_name, dd.DeviceName);
@@ -107,7 +107,6 @@ static void test_enumdisplaydevices(void)
ok(dc != NULL, "Failed to CreateDC(\"%s\") err=%d\n", dd.DeviceName, GetLastError());
DeleteDC(dc);
}
- num++;
}
if (primary_num == -1 || !pEnumDisplayMonitors || !pGetMonitorInfoA)
@@ -122,6 +121,17 @@ static void test_enumdisplaydevices(void)
@@ -276,6 +277,17 @@ static void test_enumdisplaydevices(void)
ok(!strcmp(primary_monitor_device_name, primary_device_name),
"monitor device name %s, device name %s\n", primary_monitor_device_name,
primary_device_name);
@@ -72,5 +57,5 @@ index dfdca49e792..886d63ccfe2 100644
struct vid_mode
--
2.12.2
2.20.1

View File

@@ -1,32 +1,78 @@
From cf8d6d9dd1bb75b8b78a02e0c151fef7caa1206e Mon Sep 17 00:00:00 2001
From 81d946aef87b60fa5a013eda5656c10726c5bd0a Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 30 Jan 2019 16:23:25 +1100
Subject: [PATCH] httpapi: Fake success from HttpCreateServerSession
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46549
---
dlls/httpapi/httpapi_main.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
dlls/httpapi/httpapi_main.c | 10 +++++++++-
dlls/httpapi/tests/httpapi.c | 10 +++++-----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c
index 1b35cd656ff..3e49b825567 100644
index 3ab03995e4..44e72c6f41 100644
--- a/dlls/httpapi/httpapi_main.c
+++ b/dlls/httpapi/httpapi_main.c
@@ -190,5 +190,13 @@ ULONG WINAPI HttpAddUrl( HANDLE handle, PCWSTR url, PVOID reserved )
@@ -190,7 +190,15 @@ ULONG WINAPI HttpAddUrl( HANDLE handle, PCWSTR url, PVOID reserved )
ULONG WINAPI HttpCreateServerSession( HTTPAPI_VERSION version, HTTP_SERVER_SESSION_ID *id, ULONG reserved )
{
FIXME( "({%d,%d}, %p, %d): stub!\n", version.HttpApiMajorVersion, version.HttpApiMinorVersion, id, reserved );
- return ERROR_ACCESS_DENIED;
+
+ if(!id)
+ if(!id || reserved)
+ return ERROR_INVALID_PARAMETER;
+ if(version.HttpApiMajorVersion != 2 || version.HttpApiMinorVersion != 0)
+ if((version.HttpApiMajorVersion != 1 && version.HttpApiMajorVersion != 2) || version.HttpApiMinorVersion != 0)
+ return ERROR_REVISION_MISMATCH;
+
+ *id = 0xabcdefff;
+
+ return NO_ERROR;
}
/***********************************************************************
diff --git a/dlls/httpapi/tests/httpapi.c b/dlls/httpapi/tests/httpapi.c
index e1437552a8..e090390b89 100644
--- a/dlls/httpapi/tests/httpapi.c
+++ b/dlls/httpapi/tests/httpapi.c
@@ -92,25 +92,26 @@ static void test_HttpCreateServerSession(void)
version.HttpApiMajorVersion = 1;
version.HttpApiMinorVersion = 0;
ret = pHttpCreateServerSession(version, NULL, 0);
-todo_wine
+ ok(ret == ERROR_INVALID_PARAMETER, "Unexpected return value %u.\n", ret);
+
+ version.HttpApiMajorVersion = 1;
+ version.HttpApiMinorVersion = 0;
+ ret = pHttpCreateServerSession(version, &session, 1);
ok(ret == ERROR_INVALID_PARAMETER, "Unexpected return value %u.\n", ret);
version.HttpApiMajorVersion = 1;
version.HttpApiMinorVersion = 1;
ret = pHttpCreateServerSession(version, &session, 0);
-todo_wine
ok(ret == ERROR_REVISION_MISMATCH, "Unexpected return value %u.\n", ret);
version.HttpApiMajorVersion = 3;
version.HttpApiMinorVersion = 0;
ret = pHttpCreateServerSession(version, &session, 0);
-todo_wine
ok(ret == ERROR_REVISION_MISMATCH, "Unexpected return value %u.\n", ret);
version.HttpApiMajorVersion = 2;
version.HttpApiMinorVersion = 0;
ret = pHttpCreateServerSession(version, &session, 0);
-todo_wine
ok(!ret, "Unexpected return value %u.\n", ret);
ret = pHttpCloseServerSession(session);
todo_wine
@@ -119,7 +120,6 @@ todo_wine
version.HttpApiMajorVersion = 1;
version.HttpApiMinorVersion = 0;
ret = pHttpCreateServerSession(version, &session, 0);
-todo_wine
ok(!ret, "Unexpected return value %u.\n", ret);
ret = pHttpCloseServerSession(session);
todo_wine
--
2.20.1

View File

@@ -1,4 +1,4 @@
From e5df77725c34e82d7d796b514118be6fece16386 Mon Sep 17 00:00:00 2001
From 0e78ff26dc69402d31b691f0fec956d516bcd1de Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dtimoshkov@codeweavers.com>
Date: Mon, 28 Jul 2003 07:39:25 -0500
Subject: [PATCH] libs: Fix most problems with CompareString.
@@ -9,7 +9,7 @@ Subject: [PATCH] libs: Fix most problems with CompareString.
2 files changed, 34 insertions(+), 35 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index f5d54e06..2f61e1c9 100644
index 2627fc5d..c90223e6 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -1963,13 +1963,13 @@ static void test_CompareStringA(void)
@@ -29,10 +29,10 @@ index f5d54e06..2f61e1c9 100644
lcid = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT);
@@ -5814,6 +5814,5 @@ START_TEST(locale)
test_FindStringOrdinal();
@@ -6020,6 +6020,5 @@ START_TEST(locale)
test_SetThreadUILanguage();
test_NormalizeString();
test_SpecialCasing();
- /* this requires collation table patch to make it MS compatible */
- if (0) test_sorting();
+ test_sorting();
@@ -168,5 +168,5 @@ index 465d7400..f354a75f 100644
0x0a130121, 0x0a140121, 0x02370121, 0x02350121, 0x03a30121, 0x03a40121, 0x03a50121, 0x024e0121,
0x02a10121, 0x0a150161, 0x0a290151, 0x0a3d0161, 0x0a490161, 0x0a650161, 0x0a910161, 0x0a990161,
--
2.19.1
2.20.1

View File

@@ -1,240 +0,0 @@
From a6148704ad3c09339872975b1f129c37c3d35aa3 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 20 Dec 2018 13:54:47 +1100
Subject: [PATCH] mf: Implement MFCreateSequencerSource
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46105
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/mf/main.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++
dlls/mf/mf.spec | 2 +-
dlls/mf/tests/Makefile.in | 2 +-
dlls/mf/tests/mf.c | 18 ++++++
include/mfidl.idl | 1 +
5 files changed, 161 insertions(+), 2 deletions(-)
diff --git a/dlls/mf/main.c b/dlls/mf/main.c
index 73cd6aa..1ef13b5 100644
--- a/dlls/mf/main.c
+++ b/dlls/mf/main.c
@@ -74,3 +74,143 @@ HRESULT WINAPI MFGetService(IUnknown *object, REFGUID service, REFIID riid, void
IMFGetService_Release(gs);
return hr;
}
+
+typedef struct seqsource
+{
+ IMFSequencerSource IMFSequencerSource_iface;
+ LONG ref;
+} seqsource;
+
+static inline seqsource *impl_from_IMFSequencerSource(IMFSequencerSource *iface)
+{
+ return CONTAINING_RECORD(iface, seqsource, IMFSequencerSource_iface);
+}
+
+static HRESULT WINAPI seqsource_QueryInterface(IMFSequencerSource *iface, REFIID riid, void **out)
+{
+ seqsource *This = impl_from_IMFSequencerSource(iface);
+
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), out);
+
+ if ( IsEqualIID(riid, &IID_IMFSequencerSource) ||
+ IsEqualIID(riid, &IID_IUnknown))
+ {
+ *out = &This->IMFSequencerSource_iface;
+ }
+ else
+ {
+ FIXME("(%s, %p)\n", debugstr_guid(riid), out);
+ *out = NULL;
+ return E_NOINTERFACE;
+ }
+
+ IUnknown_AddRef((IUnknown*)*out);
+ return S_OK;
+}
+
+static ULONG WINAPI seqsource_AddRef(IMFSequencerSource *iface)
+{
+ seqsource *This = impl_from_IMFSequencerSource(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI seqsource_Release(IMFSequencerSource *iface)
+{
+ seqsource *This = impl_from_IMFSequencerSource(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ if (!ref)
+ {
+ HeapFree(GetProcessHeap(), 0, This);
+ }
+
+ return ref;
+}
+
+static HRESULT WINAPI seqsource_AppendTopology(IMFSequencerSource *iface, IMFTopology *topology, DWORD flags, MFSequencerElementId *element)
+{
+ seqsource *This = impl_from_IMFSequencerSource(iface);
+
+ FIXME("%p, %p, %x, %p\n", This, topology, flags, element);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI seqsource_DeleteTopology(IMFSequencerSource *iface, MFSequencerElementId element)
+{
+ seqsource *This = impl_from_IMFSequencerSource(iface);
+
+ FIXME("%p, %d\n", This, element);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI seqsource_GetPresentationContext(IMFSequencerSource *iface, IMFPresentationDescriptor *pd, MFSequencerElementId *id,
+ IMFTopology **topology)
+{
+ seqsource *This = impl_from_IMFSequencerSource(iface);
+
+ FIXME("%p, %p, %p, %p\n", This, pd, id, topology);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI seqsource_UpdateTopology(IMFSequencerSource *iface, MFSequencerElementId id, IMFTopology *topology)
+{
+ seqsource *This = impl_from_IMFSequencerSource(iface);
+
+ FIXME("%p, %d, %p\n", This, id, topology);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI seqsource_UpdateTopologyFlags(IMFSequencerSource *iface, MFSequencerElementId id, DWORD flags)
+{
+ seqsource *This = impl_from_IMFSequencerSource(iface);
+
+ FIXME("%p, %d, %x\n", This, id, flags);
+
+ return E_NOTIMPL;
+}
+
+static const IMFSequencerSourceVtbl seqsrc_vtbl =
+{
+ seqsource_QueryInterface,
+ seqsource_AddRef,
+ seqsource_Release,
+ seqsource_AppendTopology,
+ seqsource_DeleteTopology,
+ seqsource_GetPresentationContext,
+ seqsource_UpdateTopology,
+ seqsource_UpdateTopologyFlags
+};
+
+/***********************************************************************
+ * MFCreateSequencerSource (mf.@)
+ */
+HRESULT WINAPI MFCreateSequencerSource(IUnknown *reserved, IMFSequencerSource **sequencer)
+{
+ seqsource *object;
+
+ TRACE("(%p, %p)\n", reserved, sequencer);
+
+ if (!sequencer)
+ return E_POINTER;
+
+ object = HeapAlloc(GetProcessHeap(), 0, sizeof(*object));
+ if (!object)
+ return E_OUTOFMEMORY;
+
+ object->IMFSequencerSource_iface.lpVtbl = &seqsrc_vtbl;
+ object->ref = 1;
+
+ *sequencer = &object->IMFSequencerSource_iface;
+
+ return S_OK;
+}
diff --git a/dlls/mf/mf.spec b/dlls/mf/mf.spec
index deb9057..b46c905 100644
--- a/dlls/mf/mf.spec
+++ b/dlls/mf/mf.spec
@@ -54,7 +54,7 @@
@ stub MFCreateSampleGrabberSinkActivate
@ stub MFCreateSecureHttpSchemePlugin
@ stub MFCreateSequencerSegmentOffset
-@ stub MFCreateSequencerSource
+@ stdcall MFCreateSequencerSource(ptr ptr)
@ stub MFCreateSequencerSourceRemoteStream
@ stub MFCreateSimpleTypeHandler
@ stdcall MFCreateSourceResolver(ptr) mfplat.MFCreateSourceResolver
diff --git a/dlls/mf/tests/Makefile.in b/dlls/mf/tests/Makefile.in
index f989baa..f233cff 100644
--- a/dlls/mf/tests/Makefile.in
+++ b/dlls/mf/tests/Makefile.in
@@ -1,5 +1,5 @@
TESTDLL = mf.dll
-IMPORTS = mf
+IMPORTS = mf mfplat
C_SRCS = \
mf.c
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 76e092a..ca10233 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -28,6 +28,7 @@
#include "initguid.h"
#include "mfidl.h"
+#include "mfapi.h"
#include "wine/test.h"
@@ -170,8 +171,25 @@ static void test_MFGetService(void)
ok(unk == (void *)0xdeadbeef, "Unexpected out object.\n");
}
+static void test_MFCreateSequencerSource(void)
+{
+ HRESULT hr;
+ IMFSequencerSource *seq;
+
+ hr = MFStartup(MF_VERSION, MFSTARTUP_FULL);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = MFCreateSequencerSource(NULL, &seq);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ IMFSequencerSource_Release(seq);
+
+ MFShutdown();
+}
+
START_TEST(mf)
{
test_topology();
test_MFGetService();
+ test_MFCreateSequencerSource();
}
diff --git a/include/mfidl.idl b/include/mfidl.idl
index 2373e41..39dc394 100644
--- a/include/mfidl.idl
+++ b/include/mfidl.idl
@@ -307,6 +307,7 @@ interface IMFSequencerSource : IUnknown
cpp_quote("HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **session);")
cpp_quote("HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **bytestream);" )
+cpp_quote("HRESULT WINAPI MFCreateSequencerSource(IUnknown *reserved, IMFSequencerSource **sequencer);" )
cpp_quote("HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver);")
cpp_quote("HRESULT WINAPI MFCreateStreamDescriptor(DWORD identifier, DWORD cMediaTypes,")
cpp_quote(" IMFMediaType **types, IMFStreamDescriptor **descriptor);")
--
1.9.1

View File

@@ -1 +0,0 @@
Fixes: [46105] mf: Implement MFCreateSequencerSource

View File

@@ -1,4 +1,4 @@
From 0c8487ff0c2b10bae391672c5876bfcc5987f7de Mon Sep 17 00:00:00 2001
From 1ebb577d45e3b2525f67bd03c816d3567cede547 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.
@@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
3 files changed, 145 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index b497ce3..c54eade 100644
index 15d9b44..e4fb367 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -30,6 +30,7 @@
@@ -21,8 +21,8 @@ index b497ce3..c54eade 100644
#include "wine/test.h"
#include "delayloadhandler.h"
@@ -3842,6 +3843,79 @@ static void test_InMemoryOrderModuleList(void)
ok(entry2 == mark2, "expected entry2 == mark2, got %p and %p\n", entry2, mark2);
@@ -3894,6 +3895,79 @@ static void test_dll_file( const char *name )
#undef OK_FIELD
}
+static inline WCHAR toupperW(WCHAR c)
@@ -101,11 +101,15 @@ index b497ce3..c54eade 100644
START_TEST(loader)
{
int argc;
@@ -3908,6 +3982,8 @@ START_TEST(loader)
@@ -3961,10 +4035,12 @@ START_TEST(loader)
test_import_resolution();
test_ExitProcess();
test_InMemoryOrderModuleList();
+ test_HashLinks();
test_dll_file( "ntdll.dll" );
test_dll_file( "kernel32.dll" );
test_dll_file( "advapi32.dll" );
test_dll_file( "user32.dll" );
+
/* loader test must be last, it can corrupt the internal loader state on Windows */
test_Loader();

View File

@@ -0,0 +1,92 @@
From fc6b868cee4657f9cb5b57a12cbb36a15faddd68 Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Sat, 18 Aug 2018 15:48:10 -0500
Subject: [PATCH] ntdll: Stub for MemoryWorkingSetExInformation.
---
dlls/ntdll/virtual.c | 22 ++++++++++++++++++++++
include/winternl.h | 21 ++++++++++++++++++++-
2 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 82b56b16..58563aaf 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -3024,6 +3024,25 @@ found:
}
+static NTSTATUS get_working_set_ex( HANDLE process, LPCVOID addr,
+ MEMORY_WORKING_SET_EX_INFORMATION *info,
+ SIZE_T len, SIZE_T *res_len )
+{
+ MEMORY_WORKING_SET_EX_INFORMATION *p;
+
+ for (p = info; (UINT_PTR)(p + 1) <= (UINT_PTR)info + len; p++)
+ {
+ FIXME("(VirtualAddress=%p) Unimplemented.\n", p->VirtualAddress);
+ /* FIXME Mark all addresses as invalid. */
+ info->VirtualAttributes.Valid = 0;
+ }
+
+ if (res_len)
+ *res_len = (UINT_PTR)p - (UINT_PTR)info;
+ return STATUS_SUCCESS;
+}
+
+
#define UNIMPLEMENTED_INFO_CLASS(c) \
case c: \
FIXME("(process=%p,addr=%p) Unimplemented information class: " #c "\n", process, addr); \
@@ -3048,6 +3067,9 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
case MemorySectionName:
return get_section_name( process, addr, buffer, len, res_len );
+ case MemoryWorkingSetExInformation:
+ return get_working_set_ex( process, addr, buffer, len, res_len );
+
UNIMPLEMENTED_INFO_CLASS(MemoryWorkingSetList);
UNIMPLEMENTED_INFO_CLASS(MemoryBasicVlmInformation);
diff --git a/include/winternl.h b/include/winternl.h
index 46dac7e4..44c2f94a 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -1042,7 +1042,8 @@ typedef enum _MEMORY_INFORMATION_CLASS {
MemoryBasicInformation,
MemoryWorkingSetList,
MemorySectionName,
- MemoryBasicVlmInformation
+ MemoryBasicVlmInformation,
+ MemoryWorkingSetExInformation,
} MEMORY_INFORMATION_CLASS;
typedef struct _MEMORY_SECTION_NAME
@@ -1050,6 +1051,24 @@ typedef struct _MEMORY_SECTION_NAME
UNICODE_STRING SectionFileName;
} MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
+typedef union _MEMORY_WORKING_SET_EX_BLOCK {
+ ULONG_PTR Flags;
+ struct {
+ ULONG_PTR Valid : 1;
+ ULONG_PTR ShareCount : 3;
+ ULONG_PTR Win32Protection : 11;
+ ULONG_PTR Shared : 1;
+ ULONG_PTR Node : 6;
+ ULONG_PTR Locked : 1;
+ ULONG_PTR LargePage : 1;
+ } DUMMYSTRUCTNAME;
+} MEMORY_WORKING_SET_EX_BLOCK, *PMEMORY_WORKING_SET_EX_BLOCK;
+
+typedef struct _MEMORY_WORKING_SET_EX_INFORMATION {
+ PVOID VirtualAddress;
+ MEMORY_WORKING_SET_EX_BLOCK VirtualAttributes;
+} MEMORY_WORKING_SET_EX_INFORMATION, *PMEMORY_WORKING_SET_EX_INFORMATION;
+
typedef enum _MUTANT_INFORMATION_CLASS
{
MutantBasicInformation
--
2.20.1

View File

@@ -0,0 +1,2 @@
Fixes: [45667] League of Legends 8.15+ fails due to missing implementation of NtQueryVirtualMemory(MemoryWorkingSetExInformation)
Depends: ntdll-NtQueryVirtualMemory

View File

@@ -1,7 +1,7 @@
From b96f68dff9f1daf7a2aa1427b16299bafb1a068a Mon Sep 17 00:00:00 2001
From c3a85e487e8e1ee017a2d03e9f7eccbfdd99306a Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 28 May 2017 04:19:06 +0200
Subject: ntdll: Split logic for MemoryBasicInformation into a separate
Subject: [PATCH] ntdll: Split logic for MemoryBasicInformation into a separate
function.
---
@@ -9,10 +9,10 @@ Subject: ntdll: Split logic for MemoryBasicInformation into a separate
1 file changed, 37 insertions(+), 28 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 2ac0c4394f7..5e92cbb50ea 100644
index c86ca88..26fe4a8 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -2439,40 +2439,16 @@ static int get_free_mem_state_callback( void *start, size_t size, void *arg )
@@ -2786,40 +2786,16 @@ static int get_free_mem_state_callback( void *start, size_t size, void *arg )
return 1;
}
@@ -54,10 +54,10 @@ index 2ac0c4394f7..5e92cbb50ea 100644
- }
- }
-
if (process != NtCurrentProcess())
{
NTSTATUS status;
@@ -2584,6 +2560,39 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
if (len < sizeof(MEMORY_BASIC_INFORMATION))
return STATUS_INFO_LENGTH_MISMATCH;
@@ -2934,6 +2910,39 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
}
@@ -98,5 +98,5 @@ index 2ac0c4394f7..5e92cbb50ea 100644
* NtLockVirtualMemory (NTDLL.@)
* ZwLockVirtualMemory (NTDLL.@)
--
2.14.1
1.9.1

View File

@@ -1,4 +1,4 @@
From 3a7aece1f3a8784ec20ea11e045bd4610a428651 Mon Sep 17 00:00:00 2001
From 97f429aab4d3763b2b41f4badbacb5421caf0f75 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 28 May 2017 10:30:43 +0200
Subject: [PATCH] ntdll/tests: Add tests for
@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll/tests: Add tests for
1 file changed, 35 insertions(+)
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index 1f1c675e9f..61a006f15e 100644
index 5f27d8b..7b470cd 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -1795,6 +1795,8 @@ static void test_queryvirtualmemory(void)
@@ -1928,6 +1928,8 @@ static void test_queryvirtualmemory(void)
MEMORY_BASIC_INFORMATION mbi;
char stackbuf[42];
HMODULE module;
@@ -21,10 +21,10 @@ index 1f1c675e9f..61a006f15e 100644
module = GetModuleHandleA( "ntdll.dll" );
trace("Check flags of the PE header of NTDLL.DLL at %p\n", module);
@@ -1872,6 +1874,39 @@ static void test_queryvirtualmemory(void)
/* check error code when addr is higher than working set limit */
status = pNtQueryVirtualMemory(NtCurrentProcess(), (void *)~0, MemoryBasicInformation, &mbi, sizeof(mbi), &readcount);
ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", status);
@@ -2008,6 +2010,39 @@ static void test_queryvirtualmemory(void)
/* check error code when len is less than MEMORY_BASIC_INFORMATION size */
status = pNtQueryVirtualMemory(NtCurrentProcess(), GetProcessHeap(), MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION) - 1, &readcount);
ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status);
+
+ trace("Check section name of NTDLL.DLL with invalid size\n");
+ module = GetModuleHandleA( "ntdll.dll" );
@@ -62,5 +62,5 @@ index 1f1c675e9f..61a006f15e 100644
static void test_affinity(void)
--
2.16.1
1.9.1

View File

@@ -1,41 +0,0 @@
From cb8b12121ca11c88fcb78439ccd6b4f549e1895a Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Mon, 23 Jul 2018 19:30:54 -0700
Subject: [PATCH] ntdll: Unsupported stub for MemoryWorkingSetExInformation.
Implemented in Windows Vista. This will cause programs to fail if Wine version
is higher than Windows XP / 2003.
---
dlls/ntdll/virtual.c | 1 +
include/winternl.h | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 36f0aef..a39ca94 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -3135,6 +3135,7 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
UNIMPLEMENTED_INFO_CLASS(MemoryWorkingSetList);
UNIMPLEMENTED_INFO_CLASS(MemoryBasicVlmInformation);
+ UNIMPLEMENTED_INFO_CLASS(MemoryWorkingSetExInformation);
default:
FIXME("(%p,%p,info_class=%d,%p,%ld,%p) Unknown information class\n",
diff --git a/include/winternl.h b/include/winternl.h
index 2ea22ed..8924d76 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -1038,7 +1038,8 @@ typedef enum _MEMORY_INFORMATION_CLASS {
MemoryBasicInformation,
MemoryWorkingSetList,
MemorySectionName,
- MemoryBasicVlmInformation
+ MemoryBasicVlmInformation,
+ MemoryWorkingSetExInformation
} MEMORY_INFORMATION_CLASS;
typedef struct _MEMORY_SECTION_NAME
--
1.9.1

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