Linux Joystick Mapper help : Solved
-
I'm trying to use Linux Joystick Mapper to remap mouse buttons to controller buttons. Specifically for use with DOSBox
I've followed the instructions in other Retropie posts and https://www.petrockblock.com/forums/topic/mapping-a-game-controller-in-kodi/
I've copied the contents of the joymap-0.4.2 folder to /home/pi/joymap with WinSCP
When I execute "make" in that folder with Putty, I get the following errors. I'm afraid I'm no Linux expert so would appreciate any advice..
pi@retropie:~/joymap $ make
cc -Wall -Werror -g -c -o mapparser.o mapparser.c
mapparser.c: In function ‘parse_valuepairs’:
mapparser.c:540:50: error: ‘%s’ directive writing up to 255 bytes into a region of size 238 [-Werror=format-overflow=]
sprintf(message, "Unexpected token "%s"", key.value);
^~ ~~~~~~~~~
mapparser.c:540:13: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 256
sprintf(message, "Unexpected token "%s"", key.value);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mapparser.c:529:49: error: ‘%s’ directive writing up to 255 bytes into a region of size 243 [-Werror=format-overflow=]
sprintf(message, "Unknown key "%s"", key.value);
^~ ~~~~~~~~~
mapparser.c:529:17: note: ‘sprintf’ output between 15 and 270 bytes into a destination of size 256
sprintf(message, "Unknown key "%s"", key.value);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mapparser.c:536:54: error: ‘%s’ directive writing up to 255 bytes into a region of size 238 [-Werror=format-overflow=]
sprintf(message, "Unexpected token "%s"", value.value);
^~ ~~~~~~~~~~~
mapparser.c:536:17: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 256
sprintf(message, "Unexpected token "%s"", value.value);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mapparser.c: In function ‘parse_lines’:
mapparser.c:885:54: error: ‘%s’ directive writing up to 255 bytes into a region of size 238 [-Werror=format-overflow=]
sprintf(message, "Unexpected token "%s"", t.value);
^~ ~~~~~~~
mapparser.c:885:17: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 256
sprintf(message, "Unexpected token "%s"", t.value);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: mapparser.o] Error 1 -
managed to resolve myself.
Apparently these are just warning messages and are only preventing successful compilation because of the -Werror flag in the makefile. Removed that flag and it now compiles successfully
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.