summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-01-26 20:28:00 -0800
committerMichael Pavone <pavone@retrodev.com>2017-01-26 20:28:00 -0800
commit5a16fc0aabc4d41c29859fab57c2563e15603416 (patch)
tree57445a1b5f263a1fe6b7727a0dca19abda158565
parentc2cc5668547ad2f4a05c9e37a8c49eed47e3e676 (diff)
Added mappings to allow PS-style names for leftstick/rightstick click actions aka l3/r3
-rwxr-xr-xrender_sdl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/render_sdl.c b/render_sdl.c
index d808b6f..13aa118 100755
--- a/render_sdl.c
+++ b/render_sdl.c
@@ -682,6 +682,8 @@ int32_t render_translate_input_name(int32_t controller, char *name)
button_lookup = tern_insert_int(button_lookup, "options", SDL_CONTROLLER_BUTTON_START);
button_lookup = tern_insert_int(button_lookup, "l1", SDL_CONTROLLER_BUTTON_LEFTSHOULDER);
button_lookup = tern_insert_int(button_lookup, "r1", SDL_CONTROLLER_BUTTON_RIGHTSHOULDER);
+ button_lookup = tern_insert_int(button_lookup, "l3", SDL_CONTROLLER_BUTTON_LEFTSTICK);
+ button_lookup = tern_insert_int(button_lookup, "r3", SDL_CONTROLLER_BUTTON_RIGHTSTICK);
}
intptr_t sdl_button = tern_find_int(button_lookup, name, SDL_CONTROLLER_BUTTON_INVALID);
if (sdl_button == SDL_CONTROLLER_BUTTON_INVALID) {