https://bugs.winehq.org/show_bug.cgi?id=42999
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
--- Comment #21 from Austin English austinenglish@gmail.com --- (In reply to Patryk SzczepaĆski from comment #20)
Okey, so with help of my friend (morsisko) we finally fixed the mouse bug on macOS with custom wine build.
The custom CrossOver wine executables with fix can be downloaded here: https://github.com/PSzczepanski1996/macos-crossover-wine-nostale-builder
The patch that we wrote is placed here: https://github.com/PSzczepanski1996/macos-crossover-wine-nostale-builder/ blob/main/nostale.patch
Why we must do that? Because game for some reason is checking memory regions preventing it's own odd logic from calling system memory. It checks if the code is called under "0x70000000" range, but for some reason `user32.dll` is placed here under Wine causing mouse bug, graphical glitches and other memory-releated errors.
Not sure if we should set constant values for `user32.dll` and other libraries in Wine or mix them via some randomizer like it's done in ALSR: https://user-images.githubusercontent.com/21007545/210278824-29f42d90-aca4- 4df4-8288-55ba7e23108f.png
That's done for a few dlls in wine: $ git grep EXTRADLLFLAG.*image-base dlls/kernel32/Makefile.in:EXTRADLLFLAGS = -nodefaultlibs -Wb,-F,KERNEL32.dll -Wl,--image-base,0x7b600000 dlls/kernelbase/Makefile.in:EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--image-base,0x7b000000 dlls/ntdll/Makefile.in:i386_EXTRADLLFLAGS = -Wl,--image-base,0x7bc00000 dlls/ntdll/Makefile.in:x86_64_EXTRADLLFLAGS = -Wl,--image-base,0x170000000 dlls/opengl32/Makefile.in:EXTRADLLFLAGS = -Wl,--image-base,0x7a800000 dlls/riched20/Makefile.in:EXTRADLLFLAGS = -Wl,--image-base,0x7ac00000 dlls/wow64/Makefile.in:EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x6f000000 dlls/wow64cpu/Makefile.in:EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x6f100000 dlls/wow64win/Makefile.in:EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x6f200000
It's discouraged, but if there is an application that depends on it, it's possible to hardcode it.
But this is thread to discuss since I'm not familiar with Wine development.
In general though, policy questions like this are better suited for wine-devel@winehq.org (or for coding questions, in a merge request on gitlab ;))