RASnes9x - Input device not re-detected if disconnected.
bcrew1375 opened this issue · 5 comments
It seems like if an input device(XBox 360 gamepad) is disconnected after RASnes9x has been opened, the emulator must be closed in order for the controller to be used again. This doesn't occur in other RA emus(RANes, RAProject64). This can be a huge irritation during hardcore play if a controller is accidentally disconnected, as it requires changing inputs to the keyboard for the remainder of the playtime.
This is an issue with the source emulator Snes9x: http://www.snes9x.com/phpbb3/viewtopic.php?t=24294
It's not likely something that we can fix.
Okay, I believe I actually fixed this issue with the current version of RASnes9x. RASnes9x seems based on Snes9x 1.53. The input device issue was fixed in 1.54. I found the exact changes made in 1.54 that fixed the issue and applied them to RASnes9x. It now works as expected, but I'm not used to working on other people's projects on Github and not sure if/how I should commit it.
That's good to know. Normally, you'd fork the repository, create a branch, apply the change and open a PR. Alternately, you can just link the "exact changes" and I'll create the PR myself.
Most of our emulators are based on older versions of the source emulators as we don't regularly update them. Note that even if you do get a PR up now, and it gets merged soon, it'll probably be several months before a new version of RASnes9x is released.
These are the changes I moved from 1.54:
snes9xgit/snes9x@5b4df91#diff-6c1b4c9b6f97461ec3a830b1954bd832
snes9xgit/snes9x@70cf3df#diff-6c1b4c9b6f97461ec3a830b1954bd832
snes9xgit/snes9x@951a383#diff-6c1b4c9b6f97461ec3a830b1954bd832
snes9xgit/snes9x@56a4ce5#diff-6c1b4c9b6f97461ec3a830b1954bd832
snes9xgit/snes9x@5b4df91#diff-0671f3fd1053a0149b8094739a9d34b8
I'm not sure if all are necessary, but these are the commits related to fixing the device hotplugging for 1.54. After some more tests with the changes, I did notice this can cause an exception and crash intermittently(About once every 1-2 dozen disconnects for me). There seems to be some kind of random overflow, which I'm still trying to figure out.
I've opted to just pull in all the changes from Snes9x. RASnes9x 1.0 is now based on Snes9x 1.60.
Note that it is now in a standalone repository, which should make it easier to pull in future changes: https://github.com/RetroAchievements/RASnes9x