Skip to content

Commit

Permalink
SDL: Fix button presses
Browse files Browse the repository at this point in the history
SDL currently always returns 1 if a button is pressed
  • Loading branch information
Megamouse committed Feb 3, 2023
1 parent c5b25fa commit d69e345
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rpcs3/Input/sdl_pad_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,9 @@ std::unordered_map<u64, u16> sdl_pad_handler::get_button_values(const std::share
{
const u8 value = SDL_GameControllerGetButton(dev->sdl.game_controller, button_id);
const SDLKeyCodes key_code = get_button_code(button_id);
values[key_code] = value;

// TODO: SDL does not support DS3 button intensity in the current version
values[key_code] = value ? 255 : 0;
}

for (SDL_GameControllerAxis axis_id : dev->sdl.axis_ids)
Expand Down

0 comments on commit d69e345

Please sign in to comment.