https://bugs.winehq.org/show_bug.cgi?id=48833
Bug ID: 48833 Summary: Battlefield 2: user32-rawinput-mouse causes mouse stuttering Product: Wine-staging Version: 5.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: ealex95@gmail.com CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
Created attachment 66750 --> https://bugs.winehq.org/attachment.cgi?id=66750 wine log when running battlefield 2 with the rawinput patches
Hello,
When using wine-staging patches I get stutters when turning with the mouse in Battlefield 2. The problem goes away if I compile wine with the wine-staging patches excluding the following: user32-rawinput-mouse user32-rawinput-mouse-experimental user32-rawinput-nolegacy user32-rawinput-hid
I made two video showing this issue. Please ignore the video titles, they were made before I discovered the cause. I did retest with the latest wine and wine-staging masters before posting this bug report.
Battlefield 2 without the mouse rawinput patches (walking is smooth, turning is smooth): https://www.youtube.com/watch?v=o36Rkb5LzEY
Battlefield 2 with the mouse rawinput patches (walking is smooth, turning is stuttering): https://www.youtube.com/watch?v=winvJdHEUCA
Thanks!
https://bugs.winehq.org/show_bug.cgi?id=48833
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #1 from bno1 ealex95@gmail.com --- With the latest wine-staging master (starting with commit f23b6cb7dce86844b97f6b0c9a8e9c58de7b5875 to be exact), user32-rawinput-mouse is a dependency for eventfd_synchronization, which I don't want to exclude. I tried excluding only the user32-rawinput-mouse-experimental and user32-rawinput-hid patches, but the problem still persists.
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #2 from Zebediah Figura z.figura12@gmail.com --- (In reply to bno1 from comment #1)
With the latest wine-staging master (starting with commit f23b6cb7dce86844b97f6b0c9a8e9c58de7b5875 to be exact), user32-rawinput-mouse is a dependency for eventfd_synchronization, which I don't want to exclude. I tried excluding only the user32-rawinput-mouse-experimental and user32-rawinput-hid patches, but the problem still persists.
It's not a hard dependency; it's just a side effect of the two patches touching the same code. It should be easy to manually rebase. (In fact, I think `git am -C1` could achieve this. The new ./staging/patchinstall.py script, although still under construction, has an option to use that as a backend.)
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #3 from bno1 ealex95@gmail.com --- (In reply to Zebediah Figura from comment #2)
It's not a hard dependency; it's just a side effect of the two patches touching the same code. It should be easy to manually rebase. (In fact, I think `git am -C1` could achieve this. The new ./staging/patchinstall.py script, although still under construction, has an option to use that as a backend.)
It looks like that backend is not implemented. Anyway, I will just drop the wine-staging commits that introduce those changes for my local repo, thanks.
For people trying to reproduce this who don't own Battlefield 2: This bug also happens in the Battlefield 2 Demo, which can be downloaded for free (557MB) [1]. To reproduce, just install it and start a single player game. If it crashes during loading go to Options->Video and set "Overall Quality" to Low. Also, you can decline when it asks you to install GameSpy, it's not needed.
[1] https://www.techspot.com/downloads/1313-battlefield-2-demo.html
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #4 from Zebediah Figura z.figura12@gmail.com --- (In reply to bno1 from comment #3)
(In reply to Zebediah Figura from comment #2)
It's not a hard dependency; it's just a side effect of the two patches touching the same code. It should be easy to manually rebase. (In fact, I think `git am -C1` could achieve this. The new ./staging/patchinstall.py script, although still under construction, has an option to use that as a backend.)
It looks like that backend is not implemented. Anyway, I will just drop the wine-staging commits that introduce those changes for my local repo, thanks.
If you have the time, would you mind testing the script again after f36c844f11? Note you'd want "--backend=git-am-C1". Just trying to flesh out the new script and make sure it works ;-)
https://bugs.winehq.org/show_bug.cgi?id=48833
Anya animegirl@stronzi.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |animegirl@stronzi.org
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #5 from bno1 ealex95@gmail.com --- Created attachment 66842 --> https://bugs.winehq.org/attachment.cgi?id=66842 error when running patchinstall.py outside the wine source tree
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #6 from bno1 ealex95@gmail.com --- Created attachment 66843 --> https://bugs.winehq.org/attachment.cgi?id=66843 manual fixes needed after running patchinstall.py
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #7 from bno1 ealex95@gmail.com --- (In reply to Zebediah Figura from comment #4)
If you have the time, would you mind testing the script again after f36c844f11? Note you'd want "--backend=git-am-C1". Just trying to flesh out the new script and make sure it works ;-)
Sorry, I skipped over the part you mentioned the ./staging/patchinstall.py script and I tested git-am-C1 with the .sh script. With the python script the first thing I noticed is that DEST seems to be ignored and it always runs git am on the current directory (see attached log).
Besides that issue, I tried commenting out the "Depends: user32-rawinput-mouse" from eventfd_synchronization and "Depends: user32-rawinput-nolegacy" from server-Shared_Memory and ran patchinstall.py with git-am-C1, force-autoconf and excluding the rawinput patches as per my original post. The patches applied successfully, but when compiling wine there are some compilation issues, more specifically some extra pairs of quotes around strings in libs/wine/config.c. I fixed them manually (see the attached diff with my changes). After compiling wine successfully the game works fine with this build.
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #8 from Zebediah Figura z.figura12@gmail.com --- Thanks for testing. The bug with extra quotes should be fixed now. I've also added an option --ignore-missing to skip missing dependencies.
Apparently Python doesn't see environment variables specified after argv[0], so in place of that I've changed the destination argument to a normal option.
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #9 from bno1 ealex95@gmail.com --- Yep, patchinstall.py works flawlessly with the latest commit, thanks.
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #10 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 66855 --> https://bugs.winehq.org/attachment.cgi?id=66855 Patch for staging
This patch seems to solve the issue for me with the demo, does it help for you?
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #11 from bno1 ealex95@gmail.com --- (In reply to Rémi Bernon from comment #10)
Created attachment 66855 [details] Patch for staging
This patch seems to solve the issue for me with the demo, does it help for you?
Indeed it fixes the issue for me. Should I mark this issue as resolved?
@Zebediah Figura I think patchinstall.py doesn't escape quotes in the commit message and it causes compilation errors for revert commits, for example: {"Alistair Leslie-Hughes", "Revert "dxva2: Build with msvcrt."", 1}
https://bugs.winehq.org/show_bug.cgi?id=48833
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |be8a670b5b3cf9f8a8a770c9f83 | |f31fee37e6749 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #12 from Zebediah Figura z.figura12@gmail.com --- Pushed the fix, thanks all.
The issue with unescaped quotes is also fixed; thanks for testing that.
https://bugs.winehq.org/show_bug.cgi?id=48833
--- Comment #13 from bno1 ealex95@gmail.com --- Thanks a lot for all the work!
https://bugs.winehq.org/show_bug.cgi?id=48833
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Zebediah Figura z.figura12@gmail.com --- Closing bugs fixed in Wine-Staging 5.7.