From e33ca9a4c12b3023efe213c6619d78bcda37e3ab Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 30 Apr 2018 02:52:56 +0900 Subject: [PATCH] inpututil: Add comments --- inpututil/inpututil.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inpututil/inpututil.go b/inpututil/inpututil.go index 8927d6b51..4d84b05aa 100644 --- a/inpututil/inpututil.go +++ b/inpututil/inpututil.go @@ -225,6 +225,9 @@ func MouseButtonPressDuration(button ebiten.MouseButton) int { return s } +// JustConnectedGamepadIDs returns gamepad IDs that are connected just in the current frame. +// +// JustConnectedGamepadIDs is concurrent safe. func JustConnectedGamepadIDs() []int { ids := []int{} theInputState.m.RLock() @@ -238,6 +241,9 @@ func JustConnectedGamepadIDs() []int { return ids } +// JustDisconnectedGamepadIDs returns gamepad IDs that are disconnected just in the current frame. +// +// JustDisconnectedGamepadIDs is concurrent safe. func JustDisconnectedGamepadIDs() []int { ids := []int{} theInputState.m.RLock()