S.T.A.L.K.E.R. dinput patches for Wine 1.4

Questions about Wine on macOS.
Locked
DankoB
Newbie
Newbie
Posts: 4
Joined: Fri Feb 19, 2010 6:18 pm

S.T.A.L.K.E.R. dinput patches for Wine 1.4

Post by DankoB »

Hi everyone, I've been installing software on my Mac using Wine for quite some time

Mac OS X 10.6.8
2GB RAM
ATI X1600 128 MB

Not the best specs but you'd be surprised at what will run on such an old rig.

My main inquiry for this post is concerning the Stalker series and the patch that fixed the mouse issues present in Clear Sky and Call of Pripyat pre 1.4 stable. Since around the 1.3.24 the patch I would normally use was no longer compatible due to changes in the mouse.c file.

This is the patch I had been using - http://bugs.winehq.org/attachment.cgi?i ... format=raw

Recently mr_lundis posted a revised version of this patch which is very nearly working....in fact it does work for certain games (ie F.E.A.R. Platinum & Advent Rising) Unfortunately when used for S.T.A.L.K.E.R. the results are not as desirable. The mouse becomes locked on the ground and will not warp correctly.

Here is a link to the revised patch - https://gist.github.com/1958584

Basically I'm wondering if someone here has a keen enough eye or knows what slight changes need to be made in order to make this patch work correctly for the Stalker games affected by the mouse issue. Any help or insight would be greatly appreaciated.

Here's what mr_lundis had to say about the patch
mr_lundis wrote:I have a fairly good idea on why the patch isn't working correctly, but I'm still not able to build Wine properly. And I'm not really up to compiling my own c-compiler to work around the issue :/

Anyway, If anyone feels like playing around a bit, then take a look at the conditionals on line 366 and forward in mouse.c. I think the issue might be that the rect is not mapped correctly to the window (compare with warp_check on line 437 for reference.)

Also, if anyone has any ideas on how to get gcc-4.2 working on Lion with XCode 4.2 I'd be very grateful.
jjmckenzie
Moderator
Moderator
Posts: 1153
Joined: Wed Apr 27, 2011 11:01 pm

S.T.A.L.K.E.R. dinput patches for Wine 1.4

Post by jjmckenzie »

On Thu, Mar 8, 2012 at 6:22 PM, DankoB <[email protected]> wrote:
Hi everyone, I've been installing software on my Mac using Wine for quite some time

Mac OS X 10.6.8
Recently mr_lundis posted a revised version of this patch which is very nearly working....in fact it does work for
certain games (ie F.E.A.R. Platinum & Advent Rising) Unfortunately when used for S.T.A.L.K.E.R. the results are
not as desirable. The mouse becomes locked on the ground and will not warp correctly.
Mr. Lundis will have to fix his patch as it is his and he has not
added it, as far as I know, to any bugzilla entry.

James
jjmckenzie
Moderator
Moderator
Posts: 1153
Joined: Wed Apr 27, 2011 11:01 pm

S.T.A.L.K.E.R. dinput patches for Wine 1.4

Post by jjmckenzie »

On Thu, Mar 8, 2012 at 6:22 PM, DankoB <[email protected]> wrote:
Also, if anyone has any ideas on how to get gcc-4.2 working on Lion with XCode 4.2 I'd be very grateful.
This will have to go to the Apple Open Source forums. It is WAY out
of scope of this project.

James
DankoB
Newbie
Newbie
Posts: 4
Joined: Fri Feb 19, 2010 6:18 pm

Post by DankoB »

Yea, That comment isn't actually meant for this forum...about compilling with Xcode4.3.

I guess I'll talk to him about it and see if there's anything he can do...I was just hoping that the keen eyes around here would be able to easily spot the error and give me info on what to try...I have no coding experience at all.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: S.T.A.L.K.E.R. dinput patches for Wine 1.4

Post by vitamin »

DankoB wrote:Recently mr_lundis posted a revised version of this patch which is very nearly working....in fact it does work for certain games (ie F.E.A.R. Platinum & Advent Rising) Unfortunately when used for S.T.A.L.K.E.R. the results are not as desirable. The mouse becomes locked on the ground and will not warp correctly.
Have you set "MouseWarpOverride" registry entry to "force_edge"?
DankoB
Newbie
Newbie
Posts: 4
Joined: Fri Feb 19, 2010 6:18 pm

Post by DankoB »

I have added that to the registry but it's still giving me some issues.

I have gained a bit more functionality out of the mouse by using the dinput.dll.so from the build I based the original post on, and another source I found that was patched and built with Raw3Patch + RawWarpPatch + wbemPatch --without-xinput2 (I don't have specific links which makes it difficult without knowing what patches were specifically used in the build) ...by placing the dinput source file into the this new build I can actually control the character now but from time to time the mouse will jump back to the center of the screen ultimately moving the characters line of sight in a 180 degree fashion. It gets really difficult to play while in the heat of battle if you end up turning your back on your enemy.

I thought the "m" function in the Graphics tab of WineCfg actually fixed it but it seemed that I was just lucky that it hadn't happened when I tested it....going back to it, it happening again....It's so close to being fixed.
DankoB
Newbie
Newbie
Posts: 4
Joined: Fri Feb 19, 2010 6:18 pm

Post by DankoB »

I'm kind of surprised we can't edit our posts...oh well

Just a quick question for those that may know...

What would the effect of changing:

@@ static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM

into this:

@@ static void dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

DankoB wrote:What would the effect of changing:

@@ static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM

into this:

@@ static void dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
Doubling of mouse events in some programs.
Locked