mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
dinput-Events: Since some games use different code to poll for input events, partially restore code from old version of the patch.
This commit is contained in:
parent
d807c55e94
commit
9fd51f90ef
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -1,4 +1,5 @@
|
||||
wine-staging (1.7.39) UNRELEASED; urgency=low
|
||||
* Updated patchset for dinput-Events to be compatible with more games (fixes Wine Staging Bug #149).
|
||||
* Added patch for tests of RtlIpv6StringToAddress, RtlIpv{4,6}StringToAddressEx (by Mark Jansen).
|
||||
* Added patch to fix multithreading issues with fullscreen clipping.
|
||||
* Added patch with tests for VerQueryValueA (by Mark Jansen).
|
||||
|
@ -1,8 +1,8 @@
|
||||
From 6a575f8176ff60cc4703e6299c38e15e5778881d Mon Sep 17 00:00:00 2001
|
||||
From c9ecfe26ac53dc015f02b91948db35cdc141b5d9 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 18 Dec 2014 01:04:34 +0100
|
||||
Subject: dinput: Ensure X11 input events are handled even without explicit
|
||||
message loop. (try 2)
|
||||
message loop. (try 3)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@ -24,14 +24,36 @@ till a better solution is found. This workaround will have no disadvantage, exce
|
||||
that this isn't a complete fix. Please note that not only hooks are affected by
|
||||
this issue, also *RawInput* functions show the same issue - which is the reason why
|
||||
native dinput will still not work (already tested).
|
||||
|
||||
Since games use very different code in order to query for input events, we have to
|
||||
call __wine_check_for_events from multiple locations in the code. See:
|
||||
* https://bugs.wine-staging.com/show_bug.cgi?id=42
|
||||
* https://bugs.wine-staging.com/show_bug.cgi?id=149
|
||||
---
|
||||
dlls/dinput/device.c | 5 +++--
|
||||
dlls/dinput/keyboard.c | 2 ++
|
||||
dlls/dinput/mouse.c | 2 ++
|
||||
dlls/user32/input.c | 14 ++++++++++----
|
||||
dlls/user32/user32.spec | 1 +
|
||||
include/winuser.h | 1 +
|
||||
5 files changed, 16 insertions(+), 4 deletions(-)
|
||||
6 files changed, 19 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
|
||||
index ab43029..60678be 100644
|
||||
--- a/dlls/dinput/device.c
|
||||
+++ b/dlls/dinput/device.c
|
||||
@@ -1631,8 +1631,9 @@ HRESULT WINAPI IDirectInputDevice2WImpl_Poll(LPDIRECTINPUTDEVICE8W iface)
|
||||
IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface);
|
||||
|
||||
if (!This->acquired) return DIERR_NOTACQUIRED;
|
||||
- /* Because wine devices do not need to be polled, just return DI_NOEFFECT */
|
||||
- return DI_NOEFFECT;
|
||||
+
|
||||
+ __wine_check_for_events( QS_ALLINPUT );
|
||||
+ return DI_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectInputDevice2AImpl_Poll(LPDIRECTINPUTDEVICE8A iface)
|
||||
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
|
||||
index a5967d7..9e78257 100644
|
||||
--- a/dlls/dinput/keyboard.c
|
||||
@ -133,5 +155,5 @@ index 3d9b937..7c5c01e 100644
|
||||
#endif
|
||||
|
||||
--
|
||||
2.2.2
|
||||
2.3.2
|
||||
|
||||
|
@ -1,13 +1,32 @@
|
||||
From 215ba93b9260286b916c1c73f73750f9279645e8 Mon Sep 17 00:00:00 2001
|
||||
From 84f4fe85212ac6bdff8349f41686023ecf1acda3 Mon Sep 17 00:00:00 2001
|
||||
From: Amine Khaldi <amine.khaldi@reactos.org>
|
||||
Date: Mon, 23 Feb 2015 20:14:03 +0100
|
||||
Subject: dinput: Skip Wine specific __wine_check_for_events calls in ReactOS.
|
||||
|
||||
---
|
||||
dlls/dinput/device.c | 5 +++++
|
||||
dlls/dinput/keyboard.c | 2 ++
|
||||
dlls/dinput/mouse.c | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
3 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
|
||||
index 60678be..dc901559 100644
|
||||
--- a/dlls/dinput/device.c
|
||||
+++ b/dlls/dinput/device.c
|
||||
@@ -1632,8 +1632,13 @@ HRESULT WINAPI IDirectInputDevice2WImpl_Poll(LPDIRECTINPUTDEVICE8W iface)
|
||||
|
||||
if (!This->acquired) return DIERR_NOTACQUIRED;
|
||||
|
||||
+#ifndef __REACTOS__
|
||||
__wine_check_for_events( QS_ALLINPUT );
|
||||
return DI_OK;
|
||||
+#else
|
||||
+ /* Devices do not need to be polled on ReactOS. */
|
||||
+ return DI_NOEFFECT;
|
||||
+#endif
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectInputDevice2AImpl_Poll(LPDIRECTINPUTDEVICE8A iface)
|
||||
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
|
||||
index 9e78257..3019552 100644
|
||||
--- a/dlls/dinput/keyboard.c
|
||||
@ -37,5 +56,5 @@ index 44e1d57..8249513 100644
|
||||
TRACE("(this=%p,0x%08x,%p):\n", This, len, ptr);
|
||||
_dump_mouse_state(&This->m_state);
|
||||
--
|
||||
2.3.0
|
||||
2.3.2
|
||||
|
||||
|
@ -1700,13 +1700,14 @@ fi
|
||||
# | * [#34559] Scrolling causes mouse and screen to lock in Call to Power II
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/dinput/keyboard.c, dlls/dinput/mouse.c, dlls/user32/input.c, dlls/user32/user32.spec, include/winuser.h
|
||||
# | * dlls/dinput/device.c, dlls/dinput/keyboard.c, dlls/dinput/mouse.c, dlls/user32/input.c, dlls/user32/user32.spec,
|
||||
# | include/winuser.h
|
||||
# |
|
||||
if test "$enable_dinput_Events" -eq 1; then
|
||||
patch_apply dinput-Events/0001-dinput-Ensure-X11-input-events-are-handled-even-with.patch
|
||||
patch_apply dinput-Events/0002-dinput-Skip-Wine-specific-__wine_check_for_events-ca.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "dinput: Ensure X11 input events are handled even without explicit message loop.", 2 },';
|
||||
echo '+ { "Sebastian Lackner", "dinput: Ensure X11 input events are handled even without explicit message loop.", 3 },';
|
||||
echo '+ { "Amine Khaldi", "dinput: Skip Wine specific __wine_check_for_events calls in ReactOS.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user