diff options
author | B. Watson | 2022-03-31 12:45:18 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo | 2022-04-02 13:19:18 +0200 |
commit | e20fb7b2fc0e61bb98632ffe6de549e2520de8b7 (patch) | |
tree | a967b77328769774cc30e06a45bf86f22fe66c69 /games/rejoystick/rejoystick.patch | |
parent | e27884b7eda5265f464225a5ecad0570a8f088a9 (diff) | |
download | slackbuilds-e20fb7b2fc0e61bb98632ffe6de549e2520de8b7.tar.gz |
games/rejoystick: Added (translates joystick movement/buttons)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/rejoystick/rejoystick.patch')
-rw-r--r-- | games/rejoystick/rejoystick.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/games/rejoystick/rejoystick.patch b/games/rejoystick/rejoystick.patch new file mode 100644 index 0000000000..f4e955c767 --- /dev/null +++ b/games/rejoystick/rejoystick.patch @@ -0,0 +1,21 @@ +diff -Naur rejoystick-0.8.1/src/main.c rejoystick-0.8.1.patched/src/main.c +--- rejoystick-0.8.1/src/main.c 2008-03-23 10:38:22.000000000 -0400 ++++ rejoystick-0.8.1.patched/src/main.c 2022-03-15 21:28:38.753577677 -0400 +@@ -137,12 +137,11 @@ + + pthread_t sdl_thread; + +- char* home; +- char* keyfile; +- +- home = (char*)getenv("HOME"); +- keyfile = KEYFILE; +- filename = strcat(home, keyfile); ++ const char * home = getenv("HOME"); ++ if(!home) error("HOME not set in environment"); ++ filename = malloc(strlen(home) + strlen(KEYFILE) + 1); ++ if(!filename) error("Out of memory"); ++ sprintf(filename, "%s%s", home, KEYFILE); + + global_argv = argv; + |