Mercurial > repos > blastem
comparison render_sdl.c @ 1205:3d3bad51183d
Added mappings to allow PS-style names for leftstick/rightstick click actions aka l3/r3
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 26 Jan 2017 20:28:00 -0800 |
parents | a6ae693974e0 |
children | 9d6f155732ed |
comparison
equal
deleted
inserted
replaced
1204:d7be5b6e0a8d | 1205:3d3bad51183d |
---|---|
680 button_lookup = tern_insert_int(button_lookup, "share", SDL_CONTROLLER_BUTTON_BACK); | 680 button_lookup = tern_insert_int(button_lookup, "share", SDL_CONTROLLER_BUTTON_BACK); |
681 button_lookup = tern_insert_int(button_lookup, "select", SDL_CONTROLLER_BUTTON_BACK); | 681 button_lookup = tern_insert_int(button_lookup, "select", SDL_CONTROLLER_BUTTON_BACK); |
682 button_lookup = tern_insert_int(button_lookup, "options", SDL_CONTROLLER_BUTTON_START); | 682 button_lookup = tern_insert_int(button_lookup, "options", SDL_CONTROLLER_BUTTON_START); |
683 button_lookup = tern_insert_int(button_lookup, "l1", SDL_CONTROLLER_BUTTON_LEFTSHOULDER); | 683 button_lookup = tern_insert_int(button_lookup, "l1", SDL_CONTROLLER_BUTTON_LEFTSHOULDER); |
684 button_lookup = tern_insert_int(button_lookup, "r1", SDL_CONTROLLER_BUTTON_RIGHTSHOULDER); | 684 button_lookup = tern_insert_int(button_lookup, "r1", SDL_CONTROLLER_BUTTON_RIGHTSHOULDER); |
685 button_lookup = tern_insert_int(button_lookup, "l3", SDL_CONTROLLER_BUTTON_LEFTSTICK); | |
686 button_lookup = tern_insert_int(button_lookup, "r3", SDL_CONTROLLER_BUTTON_RIGHTSTICK); | |
685 } | 687 } |
686 intptr_t sdl_button = tern_find_int(button_lookup, name, SDL_CONTROLLER_BUTTON_INVALID); | 688 intptr_t sdl_button = tern_find_int(button_lookup, name, SDL_CONTROLLER_BUTTON_INVALID); |
687 if (sdl_button == SDL_CONTROLLER_BUTTON_INVALID) { | 689 if (sdl_button == SDL_CONTROLLER_BUTTON_INVALID) { |
688 return RENDER_INVALID_NAME; | 690 return RENDER_INVALID_NAME; |
689 } | 691 } |