Skip to content

Unhandled game controller button events cause a panic #1154

@potatotech

Description

@potatotech

SDL2 has some undocumented button types for game controllers.
Currently, these are:

SDL_CONTROLLER_BUTTON_MISC1
SDL_CONTROLLER_BUTTON_PADDLE1
SDL_CONTROLLER_BUTTON_PADDLE2
SDL_CONTROLLER_BUTTON_PADDLE3
SDL_CONTROLLER_BUTTON_PADDLE4
SDL_CONTROLLER_BUTTON_TOUCHPAD

Although they are present in the automatically-generated bindings, they have no defined equivalent in the safe bindings.

When these button events appear, the following line causes a panic:

_ => panic!("unhandled controller button"),

This is the root cause of #1128.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions