mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 11:12:44 +01:00
uidriver/glfw: Bug fix: Wrong usage of RWLock
This commit is contained in:
parent
4d0e23c460
commit
d7aa24c295
@ -362,9 +362,9 @@ func (u *UserInterface) SetVsyncEnabled(enabled bool) {
|
|||||||
// m is not used for updating vsync in setScreenSize so far, but
|
// m is not used for updating vsync in setScreenSize so far, but
|
||||||
// it should be OK since any goroutines can't reach here when
|
// it should be OK since any goroutines can't reach here when
|
||||||
// the game already starts and setScreenSize can be called.
|
// the game already starts and setScreenSize can be called.
|
||||||
u.m.RLock()
|
u.m.Lock()
|
||||||
u.vsync = enabled
|
u.vsync = enabled
|
||||||
u.m.RUnlock()
|
u.m.Unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_ = u.t.Call(func() error {
|
_ = u.t.Call(func() error {
|
||||||
|
Loading…
Reference in New Issue
Block a user