KoKuToru / koku-xinput-wine

Adds xinput support to wine, without changing the source of wine.
BSD 2-Clause "Simplified" License
69 stars 21 forks source link

Unable to compile #30

Open shikaan opened 6 years ago

shikaan commented 6 years ago

Hello! I am hoping to be able to play with my PS3 controller, so I'm giving this libraries a try.

I can smoothly run cmake . (even though skipping tests), but it seems like it was something wrong with the source while running make. Most probably it depends on the version of the compiler I have on my machine, but just in case here's the error trace:

manuel@manuel:~/koku-xinput-wine$ make
[ 12%] Building CXX object CMakeFiles/koku-xinput-wine64.dir/xinput.cpp.o
/home/manuel/koku-xinput-wine/xinput.cpp:319:23: error: ‘XInputGetStateEx’ was not declared in this scope
 koku::jumper<decltype(XInputGetStateEx)> XInputGetStateExJumper;
                       ^~~~~~~~~~~~~~~~
/home/manuel/koku-xinput-wine/xinput.cpp:319:23: error: ‘XInputGetStateEx’ was not declared in this scope
/home/manuel/koku-xinput-wine/xinput.cpp:319:40: error: template argument 1 is invalid
 koku::jumper<decltype(XInputGetStateEx)> XInputGetStateExJumper;
                                        ^
/home/manuel/koku-xinput-wine/xinput.cpp:320:50: error: ‘XINPUT_STATE_EX’ has not been declared
 DWORD WINAPI XInputGetStateEx(DWORD dwUserIndex, XINPUT_STATE_EX *pState) {
                                                  ^~~~~~~~~~~~~~~
/home/manuel/koku-xinput-wine/xinput.cpp: In function ‘void koku::XInputInit(void*)’:
/home/manuel/koku-xinput-wine/xinput.cpp:382:59: error: cannot convert ‘koku::jumper<unsigned int(unsigned int, int*)>’ to ‘int’ in assignment
         koku::make_jumper(address, &koku::XInputGetStateEx);
                                                           ^
CMakeFiles/koku-xinput-wine64.dir/build.make:86: recipe for target 'CMakeFiles/koku-xinput-wine64.dir/xinput.cpp.o' failed
make[2]: *** [CMakeFiles/koku-xinput-wine64.dir/xinput.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/koku-xinput-wine64.dir/all' failed
make[1]: *** [CMakeFiles/koku-xinput-wine64.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Specs:

gcc version 6.3.0 20170516 (Debian 6.3.0-18) 

image

Could you help me?

boltronics commented 6 years ago

I hit this too. It seems Wine 3.0 was the last release koku-xinput-wine was compatible with. I even tested building against wine-staging-2.21 (which succeeded) and running the resulting library against Wine 3.2. I got the two rumbles from the controller during the game load, but unsurprisingly the remapping no longer worked.

As I understand it, Wine will be upstreaming xinput support over the course of the next month or so. Since this work has already started, it almost certainly explains why this project is no longer building. In the meantime we'll just have to be patient and stick to Wine 3.0 or Wine Staging 2.21.

MageJohn commented 6 years ago

How do we compile against different versions? I have the files on my computer, thanks to PlayOnLinux, but I don't know how to point the compiler to them.

Enverex commented 6 years ago

Shouldn't be needed anymore. Wine works natively with my controllers now in XInput games without any third party addons.

MageJohn commented 6 years ago

Okay, thanks. My gamepad isn't currently working on (Wine 3.5), but at least I know that the solution isn't here, then.

Enverex commented 6 years ago

I recommend using xboxdrv if you're getting grief, it should make your gamepad(s) work with Wine and any Linux games without any configuration at all (it basically remaps it to be an XBox 360 controller which is what everything uses as the default setup these days).

MageJohn commented 6 years ago

Okay, thanks! I'll look into that.

chewi commented 6 years ago

I still have no luck with Sonic All Stars Racing Transformed, even with xboxdrv.