diff --git a/internal/mainthread/mainthread.go b/internal/mainthread/mainthread.go index 0648904a6..020f16a39 100644 --- a/internal/mainthread/mainthread.go +++ b/internal/mainthread/mainthread.go @@ -14,6 +14,14 @@ package mainthread +import ( + "runtime" +) + +func init() { + runtime.LockOSThread() +} + var funcs = make(chan func()) // Loop starts the main-thread loop. diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index b7966de29..f8669b1e8 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -76,7 +76,6 @@ var ( ) func init() { - runtime.LockOSThread() hideConsoleWindowOnWindows() if err := initialize(); err != nil { panic(err)