Skip to content

Commit

Permalink
SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS defaults to true, to match …
Browse files Browse the repository at this point in the history
…Steam's default behavior
  • Loading branch information
slouken committed Nov 13, 2019
1 parent 8bd3398 commit 9a76beb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/SDL_hints.h
Expand Up @@ -507,7 +507,7 @@ extern "C" {
* "0" - Report the face buttons by position, as though they were on an Xbox controller.
* "1" - Report the face buttons by label instead of position
*
* The default value is "0". This hint may be set at any time.
* The default value is "1". This hint may be set at any time.
*/
#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"

Expand Down
2 changes: 1 addition & 1 deletion src/joystick/hidapi/SDL_hidapi_switch.c
Expand Up @@ -591,7 +591,7 @@ static Sint16 ApplyStickCalibration(SDL_DriverSwitch_Context *ctx, int nStick, i
static void SDLCALL SDL_GameControllerButtonReportingHintChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
{
SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)userdata;
ctx->m_bUseButtonLabels = (hint && *hint != '0' && SDL_strcasecmp(hint, "false") != 0);
ctx->m_bUseButtonLabels = (!hint || !*hint || ((*hint != '0') && (SDL_strcasecmp(hint, "false") != 0)));
}

static Uint8 RemapButton(SDL_DriverSwitch_Context *ctx, Uint8 button)
Expand Down

0 comments on commit 9a76beb

Please sign in to comment.