From d7aa24c2955e7aed32f35fe9eb3e80e03fb1c9d9 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 19 Aug 2019 01:47:55 +0900 Subject: [PATCH] uidriver/glfw: Bug fix: Wrong usage of RWLock --- internal/uidriver/glfw/ui.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index ed5278015..91ed665d6 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -362,9 +362,9 @@ func (u *UserInterface) SetVsyncEnabled(enabled bool) { // m is not used for updating vsync in setScreenSize so far, but // it should be OK since any goroutines can't reach here when // the game already starts and setScreenSize can be called. - u.m.RLock() + u.m.Lock() u.vsync = enabled - u.m.RUnlock() + u.m.Unlock() return } _ = u.t.Call(func() error {