mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-30 19:24:20 +00:00
Added SDL_GetGamepadPowerLevel() to get the power level directly from a gamepad
This commit is contained in:
@@ -389,7 +389,7 @@ void UpdateGamepadImageFromGamepad(GamepadImage *ctx, SDL_Gamepad *gamepad)
|
||||
}
|
||||
}
|
||||
|
||||
ctx->battery_level = SDL_GetJoystickPowerLevel(SDL_GetGamepadJoystick(gamepad));
|
||||
ctx->battery_level = SDL_GetGamepadPowerLevel(gamepad);
|
||||
|
||||
if (SDL_GetNumGamepadTouchpads(gamepad) > 0) {
|
||||
int num_fingers = SDL_GetNumGamepadTouchpadFingers(gamepad, 0);
|
||||
|
||||
Reference in New Issue
Block a user