Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[input] Add 'Enable Joystick' to GUI settings. Fix for http://trac.xbmc.org/ticket/13146 #1111

Merged
merged 5 commits into from Jul 8, 2012

Conversation

Karlson2k
Copy link
Member

Added GUI settings for control Joystick usage.
Some addition to CJoystick class - identical to CStatMouse.
Now Joystick can be enabled/disabled (and Initialized/deinitialized) by calling g_Joystick.SetEnable (true / false)

Also can be used as workaround for popular iMON (SoundGraph) hardware on Windows, which with latest DirectInput patches falls into endless Remove/Insert loop. That's make remote iMon control and display unusable.

@wsoltys
Copy link

wsoltys commented Jul 1, 2012

I don't think that I like that. As I can see from the imon thread this is a bug in the imon firmware and I don't want to fix their shit in our code.
Since I can't test it I would appreciate a real and more general fix if possible.

@wsoltys
Copy link

wsoltys commented Jul 1, 2012

btw for your next pr please make sure that you don't have the merge branch thingies in. Try something like git pull --rebase upstream master to get your changes on top without the merge.

@Karlson2k
Copy link
Member Author

iMon claims that this it the bug in DirectX. See 'Cause' in http://www.soundgraph.com/forums/faq.php?faq=sg_faq_sw_imon_manager_g_01#faq_sg_faq_software_products_gamecontrol
But anyway - it's unfixable because firmware isn't upgradeable. At least until Microsoft rewrote DirectInput code. :)
So, until that it's not possible to use iMON hardware with XBMC (with DirectInput Joystick). I'm sure that a lot of users will be unhappy if this will go to release.
My solution is relatively simple, doesn't broke anything and add small feature, that can be used even by users without iMON hardware.

@jmarshallnz
Copy link
Contributor

Putting aside the issue of whether we want it, the above 3 commits could be squashed into one, plus some of the checks (in ProcessEventClient) aren't needed - they don't actually use the joystick hardware stuff, rather they use the joystick keymapping stuff. Also, there's some whitespace issues on the last commit.

To squash into one, git rebase -i HEAD~3 and change the last 2 commits to squash. You'll then get to rewrite the commit message.

@wsoltys
Copy link

wsoltys commented Jul 1, 2012

To get you into thinking, is there a possibility to detect the firmware in question? Maybe via a key in the registry or a certain dll which is there?

@Karlson2k
Copy link
Member Author

OK, I'll combine all commits in one, fix whitespaces and remove some checks.
It's possible to detect hardware via USB HID properties, but I don't have a lists of buggy and bug-free firmwares.
I'm ready to write detection module. Could you advise something about lists of the hardware?

@Karlson2k
Copy link
Member Author

Started development thread for discussion: http://forum.xbmc.org/showthread.php?tid=135218

@Karlson2k
Copy link
Member Author

Rewrote from the scratch.
Now it looks like elegant solution, not like a hack as before

@wsoltys
Copy link

wsoltys commented Jul 6, 2012

I like the idea with the gui settings but you mixed too many different changes into one commit which makes it difficult to review. One commit for the gui setting and one commit for the cosmetic changes please.
I don't know what the asm fix has to do with the joystick class nor this pr in general.

@Karlson2k
Copy link
Member Author

There are just a few cosmetic points.
One of them - duplicated Reset, other - code for one function move from .h to .cpp and third one - move g_Joystick to SystemGlobal.
Do you really need separate commits?

@wsoltys
Copy link

wsoltys commented Jul 6, 2012

@jmarshallnz what do you think? can this go in?

@Karlson2k
Copy link
Member Author

OK. I'll split it to several commits. :)

@wsoltys
Copy link

wsoltys commented Jul 6, 2012

Just two are fine :)

@Karlson2k
Copy link
Member Author

Too late. :)

@Karlson2k
Copy link
Member Author

@jmarshallnz . Fine?

@jmarshallnz
Copy link
Contributor

Karlson2k: yes - please squash that one down, remove the russian translation, fix the Reset issue, and separate out your one-line if()'s onto two lines.

@Karlson2k
Copy link
Member Author

It was done already, except squash.

@jmarshallnz
Copy link
Contributor

Looks fine - please squash the fixups into the appropriate commits and I'll pull it in.

@Karlson2k
Copy link
Member Author

@jmarshallnz finally done!

@ghost ghost assigned jmarshallnz Jul 8, 2012
jmarshallnz added a commit that referenced this pull request Jul 8, 2012
[input] Add 'Enable Joystick' to GUI settings. Fix for http://trac.xbmc.org/ticket/13146
@jmarshallnz jmarshallnz merged commit ba554f1 into xbmc:master Jul 8, 2012
@jmarshallnz
Copy link
Contributor

Thanks :)

LongChair pushed a commit to RasPlex/plex-home-theatre that referenced this pull request Apr 11, 2014
LongChair pushed a commit to RasPlex/plex-home-theatre that referenced this pull request Apr 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants