mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 18:52:44 +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 {
|
func (i *Input) RuneBuffer() []rune {
|
||||||
|
i.ui.m.RLock()
|
||||||
|
defer i.ui.m.RUnlock()
|
||||||
|
|
||||||
rs := make([]rune, len(i.runes))
|
rs := make([]rune, len(i.runes))
|
||||||
copy(rs, i.runes)
|
copy(rs, i.runes)
|
||||||
return rs
|
return rs
|
||||||
|
Loading…
Reference in New Issue
Block a user