djdefiant / mame4all-pi

Automatically exported from code.google.com/p/mame4all-pi
0 stars 0 forks source link

Open and close square brackets cannot be mapped to buttons #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Hit Tab in a game to go into the game menu
2. Select Input (general)
3. Hit return on any option to remap a button
4. Hit open square bracket '[' or close square bracket ']'

What is the expected output? What do you see instead?
Expect to see the line contain [ or ] and be ready to move to another item on 
the menu.  What happens is the system acts as if I haven't hit any key at all.

What version of the product are you using? On what operating system?
0.37 BETA 5.  Raspbian.

Please provide any additional information below.
I did a quick review of the source code and noticed in src/rpi/input.cpp that 
you are mapping [ to KEY_OPENBRACE and ] to KEY_CLOSEBRACE in struct 
KeyboardInfo.  However, in struct SDLtranslate you have KEY_OPENBRACE mapping 
to SDLK_LEFTPAREN and KEY_CLOSEBRACE to SDLK_RIGHTPAREN.  I am attempting to 
compile the code after changing those mappings to SDLK_LEFTBRACKET and 
SDLK_RIGHTBRACKET, respectively, to see if that fixes the issue.

Original issue reported on code.google.com by carlton....@gmail.com on 12 Dec 2014 at 7:38

GoogleCodeExporter commented 9 years ago
After changing the Makefile LIBS line to what is below I was able to compile 
with the changes I mentioned above.  The changes fixed the issue.  I'm going to 
attach a patch file (using git diff).  The reason I was doing this is that the 
XArcade/Tankstick arcade joysticks use [ and ] for the second player buttons 6 
and 7 in their default configuration.

LIBS = -lm -lz -lrt -lasound -lpthread -lSDL -L$(SDKSTAGE)/opt/vc/lib 
-lbcm_host -lGLESv2 -lEGL -lglib-2.0

Original comment by carlton....@gmail.com on 13 Dec 2014 at 3:31

Attachments: