Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 95099 Details for
Bug 145140
app-emulation/wine ebuild - additional features
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
mousehack diff file
wine-mousehack.diff (text/plain), 3.36 KB, created by
Ramon Klass
on 2006-08-25 20:08:44 UTC
(
hide
)
Description:
mousehack diff file
Filename:
MIME Type:
Creator:
Ramon Klass
Created:
2006-08-25 20:08:44 UTC
Size:
3.36 KB
patch
obsolete
>diff -Naur wine-0.9.19/dlls/dinput/dinput_main.c wine-0.9.19-patched/dlls/dinput/dinput_main.c >--- wine-0.9.19/dlls/dinput/dinput_main.c 2006-08-10 15:15:12.000000000 +0200 >+++ wine-0.9.19-patched/dlls/dinput/dinput_main.c 2006-08-21 03:30:05.557884750 +0200 >@@ -42,10 +42,13 @@ > #include "winbase.h" > #include "winuser.h" > #include "winerror.h" >+#include "winreg.h" > #include "dinput_private.h" > > WINE_DEFAULT_DEBUG_CHANNEL(dinput); > >+#define IS_OPTION_TRUE(ch) ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1') >+ > static const IDirectInput7AVtbl ddi7avt; > static const IDirectInput7WVtbl ddi7wvt; > static const IDirectInput8AVtbl ddi8avt; >@@ -64,9 +67,22 @@ > > BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserv) > { >+ char buffer[32]; >+ DWORD size = sizeof(buffer); >+ HKEY hkey = 0; > switch(reason) > { > case DLL_PROCESS_ATTACH: >+ /* @@ Wine registry key: HKCU\Software\Wine\DirectInput */ >+ if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\DirectInput", &hkey)) { >+ if (!RegQueryValueExA( hkey, "MouseHack", 0, NULL, buffer, &size)) { >+ if ( IS_OPTION_TRUE( buffer[0] ) ) { >+ TRACE("Disabling mouse hack\n"); >+ mouse_hack = FALSE; >+ } >+ } >+ } >+ > DisableThreadLibraryCalls(inst); > DINPUT_instance = inst; > break; >diff -Naur wine-0.9.19/dlls/dinput/dinput_private.h wine-0.9.19-patched/dlls/dinput/dinput_private.h >--- wine-0.9.19/dlls/dinput/dinput_private.h 2006-08-10 15:15:12.000000000 +0200 >+++ wine-0.9.19-patched/dlls/dinput/dinput_private.h 2006-08-21 03:30:05.557884750 +0200 >@@ -54,4 +54,6 @@ > > extern HINSTANCE DINPUT_instance; > >+extern BOOL mouse_hack; >+ > #endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */ >diff -Naur wine-0.9.19/dlls/dinput/mouse.c wine-0.9.19-patched/dlls/dinput/mouse.c >--- wine-0.9.19/dlls/dinput/mouse.c 2006-08-10 15:15:12.000000000 +0200 >+++ wine-0.9.19-patched/dlls/dinput/mouse.c 2006-08-21 03:32:48.344058250 +0200 >@@ -37,7 +37,7 @@ > #include "wine/debug.h" > #include "wine/unicode.h" > >-#define MOUSE_HACK >+BOOL mouse_hack = TRUE; > > WINE_DEFAULT_DEBUG_CHANNEL(dinput); > >@@ -618,11 +618,11 @@ > SetCursorPos( This->mapped_center.x, This->mapped_center.y ); > This->last_warped = GetCurrentTime(); > >-#ifdef MOUSE_HACK >- This->need_warp = WARP_DONE; >-#else >- This->need_warp = WARP_STARTED; >-#endif >+ if(mouse_hack){ >+ This->need_warp = WARP_DONE; >+ } else { >+ This->need_warp = WARP_STARTED; >+ } > } > > return DI_OK; >@@ -699,11 +699,11 @@ > SetCursorPos( This->mapped_center.x, This->mapped_center.y ); > This->last_warped = GetCurrentTime(); > >-#ifdef MOUSE_HACK >- This->need_warp = WARP_DONE; >-#else >- This->need_warp = WARP_STARTED; >-#endif >+ if(mouse_hack){ >+ This->need_warp = WARP_DONE; >+ } else { >+ This->need_warp = WARP_STARTED; >+ } > } > > LeaveCriticalSection(&(This->crit)); >@@ -793,11 +793,11 @@ > SetCursorPos( This->mapped_center.x, This->mapped_center.y ); > This->last_warped = GetCurrentTime(); > >-#ifdef MOUSE_HACK >- This->need_warp = WARP_DONE; >-#else >- This->need_warp = WARP_STARTED; >-#endif >+ if(mouse_hack){ >+ This->need_warp = WARP_DONE; >+ } else { >+ This->need_warp = WARP_STARTED; >+ } > } > return DI_OK; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 145140
: 95099 |
95100
|
95101