JoyShockMapper
JoyShockMapper copied to clipboard
Linux support?
While I like this in principle, I'm afraid it's a low priority for me.
@AkariMarisa
Sorry I don't have much c++ experience and between paternity leave and home improvement I have little time to look into this. But I was wondering if you had tried to make some makefiles for this project? Then if there are any errors building it posting here? If you don't know how to write a makefile, then its not hard to get into, or you could even maybe look into using something like Clion which I believe can either make c++ makefiles for visual studio projects.
If you get any build errors, if you could stub out (comment out, or more helpfully set those section to only compile on windows), if you could get this to compile, even if it doesn't work, depending, that may be a big part of whats needed to get this on linux.
@JibbSmart Does this depend on any microsoft specific libraries? I imagine if not, it might be nearly just that to port it to linux. Also maybe you could tag this issue with help wanted, so its more visible for someone that can help.
@JibbSmart Does this depend on any microsoft specific libraries? I imagine if not, it might be nearly just that to port it to linux. Also maybe you could tag this issue with help wanted, so its more visible for someone that can help.
I'm sure there are many linux gamer that would like to jump on in this. This is not sarcastic.
I totally agree with this idea, +1 :)
i would love to be able to use that, +1
@AkariMarisa
Sorry I don't have much c++ experience and between paternity leave and home improvement I have little time to look into this. But I was wondering if you had tried to make some makefiles for this project? Then if there are any errors building it posting here? If you don't know how to write a makefile, then its not hard to get into, or you could even maybe look into using something like Clion which I believe can either make c++ makefiles for visual studio projects.
If you get any build errors, if you could stub out (comment out, or more helpfully set those section to only compile on windows), if you could get this to compile, even if it doesn't work, depending, that may be a big part of whats needed to get this on linux.
Thanks for reply. I never used C++ so I know nothing with, but I'll try.
@sigboe The Windows-specific stuff is put in its own file and should be easy to modify for Linux (and other platforms). The only other library it depends on is JoyShockLibrary, which I've only compiled for Windows, but one should be able to compile it for Linux without too much trouble. I'm pretty sure someone in the gyro gaming community has done this with JoyShockLibrary before, actually :)
I'd like to just add that I would also love this support as well
I need this support too. There are a lot of games in Linux Steam and I want to use gyroaim of my Nintendo Pro Controller instead of mouse in it.
Rather than post "I'd like this too" comments, it might be more constructive to just thumbs up the original comment (or if a comment has something you agree with react to it with thumbs up); that way comments on this issue can be more focused on tackling this issue, people following this won't be notified, and the number of thumbs up acts as a clear indication of how popular the issue is.
I'm sure the comments in support of the issue were made with the best intentions, but it can make issues get quite cluttered.
Linux support is now available. Make sure to check the README for compilation instructions. Binary packages are in the works.
Yeah, @kicsyromy has done awesome work making JSL and JSM both work on Linux -- huge thanks!
Linux builds will be released alongside Windows builds soon, I just need to figure out my workflow for doing that.
@kicsyromy Do you plan to post a package to AUR?
You write in the readme.
adding your user to the input group, and restarting the computer for the changes to take effect.
But you just need to log out and in again for group changes to take effect.
If you make an AUR package, the best practice is adding udev rules, since that can be removed during package removal.
Here is info about posting https://wiki.archlinux.org/index.php/Arch_User_Repository#Submitting_packages And here is AUR submission guidelines https://wiki.archlinux.org/index.php/AUR_submission_guidelines
@sigboe Thanks for the feedback. Yes, I already have a PKGBUILD, I just haven't gotten around to publishing it yet. The udev rule is commited already. I'll try and get it into the AUR this weekend.
@kicsyromy Thats great. I'll just wait until then :) Love when my packages can be updated via the package managers ^_^
@JibbSmart @kicsyromy I don't know if you know this already, but the beta for steam yesterday implemented FlickStick support as well!
Not to say this project is not valid, especially on the Linux side many don't like to use steam, or don't want to fiddle with getting steam up and running for non-steam games. I'm happy running steam, but looking forward to testing joyshockmapper too.
Hope to see a critique of Steam's implementation on your youtube @JibbSmart , And hope that instructions to get 1:1 mapping will using SCAPI/Steam will be added to the wiki.
@JibbSmart @kicsyromy you guys are my heroes
Package now available on the AUR: https://aur.archlinux.org/packages/joyshockmapper-git/ There are also, for now unofficial, packages for Ubuntu 20.04: https://download.opensuse.org/repositories/home:/kicsyromy/xUbuntu_20.04/, though keep in mind that standard disclaimers apply here, we are still working on setting everything up to offer supported packages for major disributions
@sigboe I'm hoping to have the time to have a look at it soon :) I do wonder if it's a little early for a critique video on my end, as a lot of people are giving feedback and it may change a fair bit by the time it's out of beta. My turnaround time on videos is pretty long, so I'm hesitant to make a video on something I expect will change pretty quickly. However, I've been thinking about doing a video on their gyro controls (which haven't changed in a very long time), and it might make sense to include a look at the current state of their flick stick in that.
@kicsyromy Where do I put Linux Issues? In their own tickets or wait until Linux is "out of beta" and put them here in the meanwhile?
The contents of JoyShockMapper/dist/GyroConfigs/ are not copied over to .config/GyroConfigs though they are on windows.
May I maybe suggest having an /etc/JoyShockMapper/ with system wide configs? Since we cant put things in the users directory during make install, and /etc is used for system wide configs already.
Also I don't know if this is Linux related, But Im using a PS4 controller over USB, and the gyro becomes unusable after about 20 seconds (didn't time it). It starts drifting and I need to re-calibrate the gyro again. I don't think this happened with the same controller using SCAPI
@kicsyromy Where do I put Linux Issues? In their own tickets or wait until Linux is "out of beta" and put them here in the meanwhile?
The contents of
JoyShockMapper/dist/GyroConfigs/are not copied over to.config/GyroConfigsthough they are on windows. May I maybe suggest having an/etc/JoyShockMapper/with system wide configs? Since we cant put things in the users directory duringmake install, and/etcis used for system wide configs already.
I've been meaning to do just that, copy them over to /etc, just haven't gotten around to it. As for issues, seeing as Linux support is now in (beta as it may be), I would think that Linux specific issues can be created, since it's easier to keep track of what problems users are facing. @JibbSmart What do you think?
@sigboe The latest packages now deploy the default configurations to /etc and on first start will copy them to ~/.config, without overwriting if they are already present. This change is available on all OBS builds as well as the AUR package.
@kicsyromy I'll still post here until Jibb decides to open the flood gates on the issues to the issue tracker.
I had this problem originally, but I forgot to write it. I dont know if it has to do with anything linux specific or not. Maybe @JibbSmart will know when he sees this.
Game: DOOM Eternal Controller: DS4 Connection: USB OS: Arch Linux Display server: Xorg Resolution: 1440p Window Manager: I3wm Game window setting: Fullscreen borderless xorg settings: https://termbin.com/j0msg
I have the default in game sense, and I have real world sense values from Jibbs config. But flicking the stick directly down does not do 180 degree turn. Its more like 170 or 165, which is most noticeable when flicking the stick downwards twice, so I end up turning shy of 360 degrees by one or two hours on the clock.
@sigboe Your issue may be related to the one describe in https://github.com/JibbSmart/JoyShockMapper/issues/62
Very happy for Linux-specific issues to be created :)
@sigboe Is this consistent? You'll very rarely hit exactly 180 degrees with your stick. If you're pointing your stick at 170 degrees, a correctly calibrated game should flick 170 degrees (unless you are using one of the snapping options).
@JibbSmart Yes very consistent. I try to put the controller on a surface, and use two hands to go straight down. I couldn't find anywhere in the settings it says rawinput. I don't think I have mouse acceleration on in the desktop, it doesn't feel like it and there is no mention of it in the xorg config file. But it may have some very slight acceleration in the "mouse" driver by default? But shouldn't it overshoot then?
@kicsyromy When I try installing the AUR package joyshockmapper-git now, the compaliation fails with a bunch of error messages.
Click me to reveal
[ 18%] Linking CXX static library libJoyShockLibrary.a
[ 18%] Built target JoyShockLibrary
Scanning dependencies of target JoyShockMapper
[ 36%] Building CXX object JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/main.cpp.o
[ 36%] Building CXX object JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/operators.cpp.o
In file included from /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/operators.cpp:1:
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:196:2: error: unknown type name 'KeyCode'
KeyCode pressBind; // Press or tap binding
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:197:2: error: unknown type name 'KeyCode'
KeyCode holdBind; // Hold binding if any.
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:10: error: unknown type name 'KeyCode'
Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY)
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:42: error: unknown type name 'KeyCode'
Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY)
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:26: error: use of undeclared identifier 'KeyCode'
Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY)
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:57: error: use of undeclared identifier 'KeyCode'
Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY)
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:204:23: error: no matching constructor for initialization of 'Mapping'
Mapping(int dummy) : Mapping() {}
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:204:2: note: candidate constructor not viable: requires single argument 'dummy', but no arguments were provided
Mapping(int dummy) : Mapping() {}
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:194:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were
provided
struct Mapping
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:194:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were
provided
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/operators.cpp:2:10: fatal error: 'inputHelpers.h' file not found
#include "inputHelpers.h"
^~~~~~~~~~~~~~~~
In file included from /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/main.cpp:1:
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:196:2: error: unknown type name 'KeyCode'
KeyCode pressBind; // Press or tap binding
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:197:2: error: unknown type name 'KeyCode'
KeyCode holdBind; // Hold binding if any.
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:10: error: unknown type name 'KeyCode'
Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY)
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:42: error: unknown type name 'KeyCode'
Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY)
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:26: error: use of undeclared identifier 'KeyCode'
Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY)
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:57: error: use of undeclared identifier 'KeyCode'
Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY)
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:204:23: error: no matching constructor for initialization of 'Mapping'
Mapping(int dummy) : Mapping() {}
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:204:2: note: candidate constructor not viable: requires single argument 'dummy', but no arguments were provided
Mapping(int dummy) : Mapping() {}
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:194:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were
provided
struct Mapping
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:194:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were
provided
8 errors generated.
make[2]: *** [JoyShockMapper/CMakeFiles/JoyShockMapper.dir/build.make:96: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/operators.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/main.cpp:3:
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/InputHelpers.h:17:16: error: unknown type name 'KeyCode'
int pressMouse(KeyCode vkKey, bool isPressed);
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/InputHelpers.h:20:14: error: unknown type name 'KeyCode'
int pressKey(KeyCode vkKey, bool pressed);
^
In file included from /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/main.cpp:6:
In file included from /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMAssignment.hpp:5:
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:144:5: error: member initializer 'JSMVariable' does not name a non-static data member or base class
: JSMVariable(defval)
^~~~~~~~~~~~~~~~~~~
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:155:60: error: use of undeclared identifier '_defVal'
_chordedVariables.emplace( chord, JSMVariable<T>(*this, _defVal) );
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:167:48: error: use of undeclared identifier '_value'
return chord != ButtonID::INVALID ? optional(_value) : nullopt;
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:190:5: error: member initializer 'ChordedVariable' does not name a non-static data member or base class
: ChordedVariable(defaultValue)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:209:24: error: use of undeclared identifier '_chordedVariables'
auto modeshiftVar = _chordedVariables.find(modeshift);
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:210:24: error: use of undeclared identifier '_chordedVariables'
if (modeshiftVar != _chordedVariables.end())
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:212:5: error: use of undeclared identifier '_chordedVariables'; did you mean 'ChordedVariable'?
_chordedVariables.erase(modeshiftVar);
^~~~~~~~~~~~~~~~~
ChordedVariable
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:136:7: note: 'ChordedVariable' declared here
class ChordedVariable : public JSMVariable<T>
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:212:5: error: use of undeclared identifier '_chordedVariables'; did you mean 'ChordedVariable'?
_chordedVariables.erase(modeshiftVar);
^~~~~~~~~~~~~~~~~
ChordedVariable
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:136:7: note: 'ChordedVariable' declared here
class ChordedVariable : public JSMVariable<T>
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:212:5: error: unknown type name '_chordedVariables'
_chordedVariables.erase(modeshiftVar);
^
/tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:212:22: error: cannot use dot operator on a type
_chordedVariables.erase(modeshiftVar);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [JoyShockMapper/CMakeFiles/JoyShockMapper.dir/build.make:83: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:173: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
:: Unable to build joyshockmapper-git - makepkg exited with code: 4
=>> Try again? [y/N]:
```
@kicsyromy When I try installing the AUR package
joyshockmapper-gitnow, the compaliation fails with a bunch of error messages. Click me to reveal
Hello, I've been away for a few days. Thanks for bringing this to my attention. A large refactor was merged a couple of days ago, and thats why. I will look into this and try to get a fix out this weekend.
@kicsyromy Would it make sense to change the PKGBUILD to fetch from releases source code archives? This way an update won't break anything. But the AUR will be outdated every time there is an update. Having a few human package managers, or a script to test the build and update AUR could alleviate that issue though.