collapse

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Strange Mouse Behavior with UP-10  (Read 475 times)

Offline GrumpyProgrammer

  • Fledgling
  • *
  • Posts: 4
  • Reputation: 0
Strange Mouse Behavior with UP-10
« on: June 19, 2018, 10:13:53 PM »
Hey there.

I've encountered some strange mouse behavior with the Unofficial Patch 10 when launching the game through the loader-linux.sh, regardless of what mod is chosen.

The game seems to work just fine, except that the mouse becomes virtually uncontrollable. The behavior is kinda difficult to describe; it's like all the mouse movement events are being repeated in a queue innumerable times so that any small movement of the mouse is repeated. The end result is that the cursor drunkenly sways back and forth and up and down, usually becoming locked either staring directly up at the sky or down at the ground. This happens in both first and third person.

Changing the mouse sensitivity has no effect other than increasing or decreasing the speed at which it drunkenly flails around. Disabling Mouse Look has no effect other than the character moving as the camera flails.

Interestingly enough, if I run the game through a desktop shortcut or directly through the command line instead of using the loader script, the problem goes away and the mouse operates as normal. The only difference here is that the fonts for the various types of dialog are all the same.

I'm using the non-Steam version of the original game, running on Linux Wine (obviously) wine-3.7 with the newest edition of Ubuntu desktop on the 4.15.0-22 kernel.

Since I can run the game just fine without the mod loader, this isn't critical, but it's still rather baffling. I took a brief look at the shell script and couldn't see anything in it that would affect the mouse in any way. The only real issue I've encountered with running Bloodlines not with the mod loader is the font problem mentioned above. I can only presume this might have something to do with the fact that I'm using original data and not the Steam version.



Offline SCO

  • Ancillus
  • ***
  • Posts: 168
  • Reputation: 4
Re: Strange Mouse Behavior with UP-10
« Reply #1 on: November 02, 2018, 10:24:11 PM »
Same here. Did something changed with the dll hacks on UP? Maybe a FOV or aspect ratio hack is broken?

The mod loader (not the script, the 'altered dll') needs a wine override to load in linux, so it *appears* either the new wine version or a new version of the hack dlls that is broken.

Same thing happens with CQM 4.0.1 btw.

And without the mod loader you're not actually using the latest version of the mod (if you're using the steam install) or the mod at all (if you aren't).

Wesp did you update the modloader dlls in between UP9 and UP10? I think it's 'dbghelp.dll'.

If you didn't, the problem is on wine and must be reported.
« Last Edit: November 02, 2018, 11:01:39 PM by SCO »

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 5430
  • Reputation: 853
  • Unofficial Patcher
Re: Strange Mouse Behavior with UP-10
« Reply #2 on: November 02, 2018, 11:11:49 PM »
Wesp did you update the modloader dlls in between UP9 and UP10? I think it's 'dbghelp.dll'.

No, the date of the file is the same. But Psycho-A changed the whole setup and moved it away from dbghelp.dll for the final 10.1!

Offline SCO

  • Ancillus
  • ***
  • Posts: 168
  • Reputation: 4
Re: Strange Mouse Behavior with UP-10
« Reply #3 on: November 03, 2018, 12:15:39 AM »
So... what dll it uses to hook now? Should i/you just comment the override?

Anyway, i found out this can be avoided by opening the game on X11 instead of wayland. If you do that it opens the first time with 800x600 rez instead of (what i thought i had) the native rez of my monitor (1366x768)...

Since wayland (by design) doesn't allow non-system resolution changes, it appears to be something like this:

1. hack tries to change resolution, tries to change FOV (or tries to change FOV as if the resolution was 800x600). This may be because of the 'widescreen mod' being part of the standard UP install not sure.
2. resolution change actually fails in wayland, game fallsback to the only available resolution (desktop).
3. mouse is fucked because it thinks it's running on a much smaller window than it is.


You should bother the person making the hack to see if the problem is the above and if he or she can solve this problem by not  assuming the 'first' resolution the game tries succeeds so the right fov value is set.

If indeed this is the problem, i dunno.
« Last Edit: November 03, 2018, 01:02:38 AM by SCO »

Offline SCO

  • Ancillus
  • ***
  • Posts: 168
  • Reputation: 4
Re: Strange Mouse Behavior with UP-10
« Reply #4 on: November 03, 2018, 01:05:03 AM »
Also wesp, if your patch (and others) no longer requires the dll (if say, the executable was edited directly), you shouldn't distribute it and should edit out the

"export WINEDLLOVERRIDES="dbghelp=n,b"" line from the linux launcher script.

Strange behavior might occur from two versions of the same code being forced to run (although i tried to delete the dll and the line and regenerate the WINEPREFIX and that didn't make a difference to the mouse bug to me in UP+10).
« Last Edit: November 03, 2018, 01:07:35 AM by SCO »

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 5430
  • Reputation: 853
  • Unofficial Patcher
Re: Strange Mouse Behavior with UP-10
« Reply #5 on: November 03, 2018, 08:40:57 AM »
So... what dll it uses to hook now? Should i/you just comment the override?

Psycho-A uses the launcher.dll in the Bin folder now.

Quote
Since wayland (by design) doesn't allow non-system resolution changes, it appears to be something like this:

What is wayland?

Quote
You should bother the person making the hack to see if the problem is the above and if he or she can solve this problem by not  assuming the 'first' resolution the

Psycho-A, are you reading this?

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 5430
  • Reputation: 853
  • Unofficial Patcher
Re: Strange Mouse Behavior with UP-10
« Reply #6 on: November 03, 2018, 08:42:24 AM »
Also wesp, if your patch (and others) no longer requires the dll (if say, the executable was edited directly), you shouldn't distribute it and should edit out the

"export WINEDLLOVERRIDES="dbghelp=n,b"" line from the linux launcher script.

Psycho-A already thought about this, I hope he appears to look at the rest!

Offline Psycho-A

  • Ancillus
  • ***
  • Posts: 201
  • Reputation: 27
  • Bloodlines SDK developer
Re: Strange Mouse Behavior with UP-10
« Reply #7 on: November 03, 2018, 08:54:30 AM »
Also wesp, if your patch (and others) no longer requires the dll (if say, the executable was edited directly), you shouldn't distribute it and should edit out the

"export WINEDLLOVERRIDES="dbghelp=n,b"" line from the linux launcher script.

Strange behavior might occur from two versions of the same code being forced to run (although i tried to delete the dll and the line and regenerate the WINEPREFIX and that didn't make a difference to the mouse bug to me in UP+10).
I'm using launcher.dll to load loader.dll instead of dbghelp, so all the conflicts must be gone. And I removed override string in loader-linux.sh.

And yes, what is Wayland - is it something like Wine environment? And what's meant by "non-system change"? Game changes it's resolution only on the next launch, so if you set it to your desktop values, it would be applied on next launch well, since desktop resolution won't be changed in fact. And the other way to avoid resolution changing is running game with -w xxxx -h yyyy command line. In general, loader dll is not designed to be compatible with some Win emulators, and I'm not sure its real programmer would care about that, as he seems to be out of that works now...
« Last Edit: November 03, 2018, 03:09:46 PM by Wesp5 »

Offline SCO

  • Ancillus
  • ***
  • Posts: 168
  • Reputation: 4
Re: Strange Mouse Behavior with UP-10
« Reply #8 on: November 03, 2018, 11:32:25 AM »
Wayland is one of the Desktop environments 'foundations' in linux.

You have gnome, kde etc and they in turn use X11 or Wayland (new). These foundations set up drivers, provide windowing capabilities to DEs etc.


So basically Wayland decided for security sake to forbid other applications than a 'blessed' program from changing the desktop resolution. The reason is stated as 'games and other things crashed and left it at the wrong resolution' or 'malicious programs could force a broken resolution with xrandr or similar'.

Instead the idea of what they want, but is not implemented yet is to show to XWayland (the compatibility shim for X11 apps in wayland) the desktop res + every single possible resolution that is lower than that and just scale up on the graphics driver if the game wants a lower resolution. What is implemented is that games only 'see' the desktop resolution. Many games fallback correctly and Bloodlines appears to be one of them -  if you had 800x600 it'd try to match it to the available resolutions, fail, then choose the single 1366x768 - except this mouse thing.

Wine runs on XWayland on a Wayland login.

Anyway, there is reason to believe the problem will solve itself in time. Meanwhile you can logout of Wayland and login with X11.

But maybe i'm too optimistic, after all this is all speculation on the cause. For all i know there is a bug with mouse itself on wine+wayland and the bug doesn't have anything to do with resolution. I told you to tell the hacker to investigate for a reason, he'd probably could tell if the FoV or aspect ratio values he expected got broken at runtime compared to the resolution by debugging on a Wayland linux login.
« Last Edit: November 04, 2018, 06:17:41 PM by SCO »

 

* Game Files