mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 12:08:58 +01:00
internal/gamepad: add a warning message when getGamepads is not available
Updates #2100
This commit is contained in:
parent
8d318fc4de
commit
8d3de6207b
@ -49,6 +49,7 @@ func (g *nativeGamepads) update(gamepads *gamepads) error {
|
||||
|
||||
// getGamepads might not exist under a non-secure context (#2100).
|
||||
if !nav.Get("getGamepads").Truthy() {
|
||||
js.Global().Get("console").Call("warn", "navigator.getGamepads is not available. This might require a secure (HTTPS) context.")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user