summaryrefslogtreecommitdiff
path: root/app-emulation/wine/files/0001-dinput-Read-raw-relative-mouse-movements-from-dev.patch
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-03-31 01:02:23 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-03-31 01:02:23 +0300
commit7e95f610fccf1d0d9d10e530a98862d756f6aaa6 (patch)
tree8107828f5839ef98bf4b2300866ff261a32c2194 /app-emulation/wine/files/0001-dinput-Read-raw-relative-mouse-movements-from-dev.patch
parentde6947fd89a044bc6278e079039571d3045cb9b1 (diff)
new file: files/0001-dinput-Read-raw-relative-mouse-movements-from-dev.patch
new file: files/mousepatch.diff new file: files/wine-1.1.15-configure-host.patch new file: files/wine-1.1.15-winegcc.patch new file: files/wine-1.1.4-install-fix.patch new file: files/wine-gentoo-no-ssp.patch #
Diffstat (limited to 'app-emulation/wine/files/0001-dinput-Read-raw-relative-mouse-movements-from-dev.patch')
-rw-r--r--app-emulation/wine/files/0001-dinput-Read-raw-relative-mouse-movements-from-dev.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/app-emulation/wine/files/0001-dinput-Read-raw-relative-mouse-movements-from-dev.patch b/app-emulation/wine/files/0001-dinput-Read-raw-relative-mouse-movements-from-dev.patch
new file mode 100644
index 0000000..e1d922c
--- /dev/null
+++ b/app-emulation/wine/files/0001-dinput-Read-raw-relative-mouse-movements-from-dev.patch
@@ -0,0 +1,77 @@
+From f0859f18b398a895286105a7b6a1ba9d8b2248af Mon Sep 17 00:00:00 2001
+From: Daniel Scharrer <dscharrer@gmail.com>
+Date: Tue, 13 Jan 2009 18:19:26 +0100
+Subject: dinput: Read raw relative mouse movements from /dev/input/mice.
+
+---
+ dlls/dinput/mouse.c | 26 ++++++++++++++++++++++----
+ 1 files changed, 22 insertions(+), 4 deletions(-)
+
+diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c
+index 178b8fb..273d605 100644
+--- a/dlls/dinput/mouse.c
++++ b/dlls/dinput/mouse.c
+@@ -25,6 +25,8 @@
+ #include <stdarg.h>
+ #include <string.h>
+
++#include <fcntl.h>
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "wingdi.h"
+@@ -76,6 +78,8 @@ struct SysMouseImpl
+ DIMOUSESTATE2 m_state;
+
+ WARP_MOUSE warp_override;
++
++ int mouse;
+ };
+
+ static void dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam );
+@@ -198,6 +202,11 @@ static SysMouseImpl *alloc_device(REFGUID rguid, const void *mvt, IDirectInputIm
+ newDevice->base.dinput = dinput;
+ newDevice->base.event_proc = dinput_mouse_hook;
+
++ newDevice->mouse = open("/dev/input/mice", O_RDONLY);
++
++ if(newDevice->mouse < 0)
++ WARN("unable to open /dev/input/mice for reading");
++
+ get_app_key(&hkey, &appkey);
+ if (!get_config_key(hkey, appkey, "MouseWarpOverride", buffer, sizeof(buffer)))
+ {
+@@ -303,9 +312,17 @@ static void dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARA
+ {
+ POINT pt, pt1;
+
+- GetCursorPos(&pt);
+- This->m_state.lX += pt.x = hook->pt.x - pt.x;
+- This->m_state.lY += pt.y = hook->pt.y - pt.y;
++ if(This->mouse >= 0)
++ {
++ char input[3] = {0,0,0};
++ read(This->mouse, input, 3);
++ This->m_state.lX += pt.x = input[1];
++ This->m_state.lY += pt.y = input[2];
++ } else {
++ GetCursorPos(&pt);
++ This->m_state.lX += pt.x = hook->pt.x - pt.x;
++ This->m_state.lY += pt.y = hook->pt.y - pt.y;
++ }
+
+ if (This->base.data_format.user_df->dwFlags & DIDF_ABSAXIS)
+ {
+@@ -331,7 +348,8 @@ static void dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARA
+
+ This->need_warp = This->warp_override != WARP_DISABLE &&
+ (pt.x || pt.y) &&
+- (dwCoop & DISCL_EXCLUSIVE || This->warp_override == WARP_FORCE_ON);
++ (dwCoop & DISCL_EXCLUSIVE || This->warp_override == WARP_FORCE_ON) &&
++ This->mouse < 0;
+ break;
+ }
+ case WM_MOUSEWHEEL:
+--
+1.6.0.6
+