0ldsk00l / nestopia

Cross-platform Nestopia emulator core with a GUI
http://0ldsk00l.ca/nestopia
GNU General Public License v2.0
683 stars 167 forks source link

controller config input problem: incorrect detection of the buttons with SDL Scancode >9 #140

Closed YogSottot closed 9 years ago

YogSottot commented 9 years ago

I am try to configure inputs for my Sony PS3 Controller (Sixaxis) When i'm set it up, it look like this nestopia input config bug

js_a=j0b36
js_b=j0b33
js_ta=j0b35
js_tb=j0b34

If i restart nestopia and go into input menu, it look like this nestopia input config bug

js_a=j0b3
js_b=j0b3
js_ta=j0b3
js_tb=j0b3

But this numbers is incorrect. It should be like this

js_a=j0b15
js_b=j0b12
js_ta=j0b14
js_tb=j0b13

I'm edit config file directly, but after start nestopia, file was reset to

js_a=j0b1
js_b=j0b1
js_ta=j0b1
js_tb=j0b1

So, i suppose, there is incorrect work with the buttons with SDL Scancode >9. Stripping from 2-digit to 1-digit.

[I] games-emulation/nestopia
     Available versions:  1.40 1.46.2 {doc}
     Installed versions:  1.46.2(18:30:46 19/06/15)(-doc)
     Homepage:            http://0ldsk00l.ca/nestopia/
     Description:         A portable Nintendo Entertainment System emulator written in C++
rdanbrook commented 9 years ago

Thanks for the bug report. I'll take a look at this shortly, it should not be hard to fix.

rdanbrook commented 9 years ago

I think I fixed it, can you confirm?

rdanbrook commented 9 years ago

I'm going to assume the problem is resolved.

YogSottot commented 9 years ago

I'm added your patch into 1.46.2's sources and it's works ok now. Thank you.