inpututil: Rename TouchDuration -> TouchPressDuration

This commit is contained in:
Hajime Hoshi 2018-04-30 20:23:58 +09:00
parent db3effe65a
commit 154d663d81

View File

@ -323,10 +323,10 @@ func IsTouchJustReleased(id int) bool {
return r return r
} }
// TouchDuration returns how long the touch remains in frames. // TouchPressDuration returns how long the touch remains in frames.
// //
// TouchDuration is concurrent safe. // TouchPressDuration is concurrent safe.
func TouchDuration(id int) int { func TouchPressDuration(id int) int {
theInputState.m.RLock() theInputState.m.RLock()
s := theInputState.touchDurations[id] s := theInputState.touchDurations[id]
theInputState.m.RUnlock() theInputState.m.RUnlock()