mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/uidriver/mobile: Bug fix: Use mutex at RuneBuffers
This commit is contained in:
parent
26bb1b5f31
commit
5d2c8ad9be
@ -161,6 +161,9 @@ func (i *Input) TouchPosition(id driver.TouchID) (x, y int) {
|
||||
}
|
||||
|
||||
func (i *Input) RuneBuffer() []rune {
|
||||
i.ui.m.RLock()
|
||||
defer i.ui.m.RUnlock()
|
||||
|
||||
rs := make([]rune, len(i.runes))
|
||||
copy(rs, i.runes)
|
||||
return rs
|
||||
|
Loading…
Reference in New Issue
Block a user