ebiten: Update input API comments for Android

Closes #1539
This commit is contained in:
Hajime Hoshi 2021-03-14 18:02:50 +09:00
parent bc42cb31c3
commit 763ed32ca6

View File

@ -125,7 +125,7 @@ func GamepadSDLID(id GamepadID) string {
// - Chrome: "Xbox 360 Controller (XInput STANDARD GAMEPAD)" // - Chrome: "Xbox 360 Controller (XInput STANDARD GAMEPAD)"
// - Firefox: "xinput" // - Firefox: "xinput"
// //
// GamepadName always returns an empty string on mobiles. // GamepadName always returns an empty string on iOS.
// //
// GamepadName is concurrent-safe. // GamepadName is concurrent-safe.
func GamepadName(id GamepadID) string { func GamepadName(id GamepadID) string {
@ -136,7 +136,7 @@ func GamepadName(id GamepadID) string {
// //
// GamepadIDs is concurrent-safe. // GamepadIDs is concurrent-safe.
// //
// GamepadIDs always returns an empty slice on mobiles. // GamepadIDs always returns an empty slice on iOS.
func GamepadIDs() []GamepadID { func GamepadIDs() []GamepadID {
return uiDriver().Input().GamepadIDs() return uiDriver().Input().GamepadIDs()
} }
@ -145,7 +145,7 @@ func GamepadIDs() []GamepadID {
// //
// GamepadAxisNum is concurrent-safe. // GamepadAxisNum is concurrent-safe.
// //
// GamepadAxisNum always returns 0 on mobiles. // GamepadAxisNum always returns 0 on iOS.
func GamepadAxisNum(id GamepadID) int { func GamepadAxisNum(id GamepadID) int {
return uiDriver().Input().GamepadAxisNum(id) return uiDriver().Input().GamepadAxisNum(id)
} }
@ -154,7 +154,7 @@ func GamepadAxisNum(id GamepadID) int {
// //
// GamepadAxis is concurrent-safe. // GamepadAxis is concurrent-safe.
// //
// GamepadAxis always returns 0 on mobiles. // GamepadAxis always returns 0 on iOS.
func GamepadAxis(id GamepadID, axis int) float64 { func GamepadAxis(id GamepadID, axis int) float64 {
return uiDriver().Input().GamepadAxis(id, axis) return uiDriver().Input().GamepadAxis(id, axis)
} }
@ -163,7 +163,7 @@ func GamepadAxis(id GamepadID, axis int) float64 {
// //
// GamepadButtonNum is concurrent-safe. // GamepadButtonNum is concurrent-safe.
// //
// GamepadButtonNum always returns 0 on mobiles. // GamepadButtonNum always returns 0 on iOS.
func GamepadButtonNum(id GamepadID) int { func GamepadButtonNum(id GamepadID) int {
return uiDriver().Input().GamepadButtonNum(id) return uiDriver().Input().GamepadButtonNum(id)
} }
@ -178,7 +178,7 @@ func GamepadButtonNum(id GamepadID) int {
// The relationships between physical buttons and buttion IDs depend on environments. // The relationships between physical buttons and buttion IDs depend on environments.
// There can be differences even between Chrome and Firefox. // There can be differences even between Chrome and Firefox.
// //
// IsGamepadButtonPressed always returns false on mobiles. // IsGamepadButtonPressed always returns false on iOS.
func IsGamepadButtonPressed(id GamepadID, button GamepadButton) bool { func IsGamepadButtonPressed(id GamepadID, button GamepadButton) bool {
return uiDriver().Input().IsGamepadButtonPressed(id, driver.GamepadButton(button)) return uiDriver().Input().IsGamepadButtonPressed(id, driver.GamepadButton(button))
} }