Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL API renaming: SDL_gamecontroller.h #6885

Closed
slouken opened this issue Dec 23, 2022 · 5 comments
Closed

SDL API renaming: SDL_gamecontroller.h #6885

slouken opened this issue Dec 23, 2022 · 5 comments

Comments

@slouken
Copy link
Collaborator

slouken commented Dec 23, 2022

Here are proposed name changes for functions in SDL_gamecontroller.h, per discussion in #6569

I'm also proposing changing "GameController" to "Gamepad" in the SDL API.

SDL_GameControllerAddMapping => SDL_AddGamepadMapping
SDL_GameControllerAddMappingsFromRW => SDL_AddGamepadMappingsFromRW
SDL_GameControllerAddMappingsFromFile => SDL_AddGamepadMappingsFromFile
SDL_GameControllerClose => SDL_CloseGamepad
SDL_GameControllerEventState => SDL_GetGamepadEventState
SDL_GameControllerFromInstanceID => SDL_GetGamepadFromInstanceID
SDL_GameControllerFromPlayerIndex => SDL_GetGamepadFromPlayerIndex
SDL_GameControllerGetAppleSFSymbolsNameForAxis => SDL_GetGamepadAppleSFSymbolsNameForAxis
SDL_GameControllerGetAppleSFSymbolsNameForButton => SDL_GetGamepadAppleSFSymbolsNameForButton
SDL_GameControllerGetAttached => SDL_IsGamepadConnected
SDL_GameControllerGetAxis => SDL_GetGamepadAxis
SDL_GameControllerGetAxisFromString => SDL_GetGamepadAxisFromString
SDL_GameControllerGetBindForAxis => SDL_GetGamepadBindForAxis
SDL_GameControllerGetBindForButton => SDL_GetGamepadBindForButton
SDL_GameControllerGetButton => SDL_GetGamepadButton
SDL_GameControllerGetButtonFromString => SDL_GetGamepadButtonFromString
SDL_GameControllerGetFirmwareVersion => SDL_GetGamepadFirmwareVersion
SDL_GameControllerGetJoystick => SDL_GetGamepadJoystick
SDL_GameControllerGetNumTouchpadFingers => SDL_GetGamepadNumTouchpadFingers
SDL_GameControllerGetNumTouchpads => SDL_GetGamepadNumTouchpads
SDL_GameControllerGetPlayerIndex => SDL_GetGamepadPlayerIndex
SDL_GameControllerGetProduct => SDL_GetGamepadProduct
SDL_GameControllerGetProductVersion => SDL_GetGamepadProductVersion
SDL_GameControllerGetSensorData => SDL_GetGamepadSensorData
SDL_GameControllerGetSensorDataRate => SDL_GetGamepadSensorDataRate
SDL_GameControllerGetSerial => SDL_GetGamepadSerial
SDL_GameControllerGetStringForAxis => SDL_GetGamepadStringForAxis
SDL_GameControllerGetStringForButton => SDL_GetGamepadStringForButton
SDL_GameControllerGetTouchpadFinger => SDL_GetGamepadTouchpadFinger
SDL_GameControllerGetType => SDL_GetGamepadType
SDL_GameControllerGetVendor => SDL_GetGamepadVendor
SDL_GameControllerHasAxis => SDL_GamepadHasAxis
SDL_GameControllerHasButton => SDL_GamepadHasButton
SDL_GameControllerHasLED => SDL_GamepadHasLED
SDL_GameControllerHasRumble => SDL_GamepadHasRumble
SDL_GameControllerHasRumbleTriggers => SDL_GamepadHasRumbleTriggers
SDL_GameControllerHasSensor => SDL_GamepadHasSensor
SDL_GameControllerIsSensorEnabled => SDL_IsGamepadSensorEnabled
SDL_GameControllerMapping => SDL_GetGamepadMapping
SDL_GameControllerMappingForDeviceIndex => SDL_GetGamepadMappingForDeviceIndex
SDL_GameControllerMappingForGUID => SDL_GetGamepadMappingForGUID
SDL_GameControllerMappingForIndex => SDL_GetGamepadMappingForIndex
SDL_GameControllerName => SDL_GetGamepadName
SDL_GameControllerNameForIndex => SDL_GetGamepadNameForIndex
SDL_GameControllerNumMappings => SDL_GetNumGamepadMappings
SDL_GameControllerOpen => SDL_OpenGamepad
SDL_GameControllerPath => SDL_GetGamepadPath
SDL_GameControllerPathForIndex => SDL_GetGamepadPathForIndex
SDL_GameControllerRumble => SDL_RumbleGamepad
SDL_GameControllerRumbleTriggers => SDL_RumbleGamepadTriggers
SDL_GameControllerSendEffect => SDL_SendGamepadEffect
SDL_GameControllerSetLED => SDL_SetGamepadLED
SDL_GameControllerSetPlayerIndex => SDL_SetGamepadPlayerIndex
SDL_GameControllerSetSensorEnabled => SDL_SetGamepadSensorEnabled
SDL_GameControllerTypeForIndex => SDL_GetGamepadTypeForIndex
SDL_GameControllerUpdate => SDL_UpdateGamepads
SDL_IsGameController => SDL_IsGamepad

@libsdl-org/a-team for discussion?

@icculus
Copy link
Collaborator

icculus commented Dec 27, 2022

100% yes on the "Gamepad" name change, rest looks good too.

@icculus
Copy link
Collaborator

icculus commented Dec 27, 2022

(Also, needless to say, let's rename the header itself, too.)

@slouken
Copy link
Collaborator Author

slouken commented Dec 27, 2022

(Also, needless to say, let's rename the header itself, too.)

Yep, for sure. :)

@icculus
Copy link
Collaborator

icculus commented Dec 28, 2022

Oh, here's one I missed: SDL_GetGamepadEventState() is actually mostly a setter function that also has a query mode.

We should rename that, and/or split this into two functions.

@slouken
Copy link
Collaborator Author

slouken commented Dec 28, 2022

I'm on it!

@slouken slouken closed this as completed Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants