mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
ui: Need LockOSThread for mobile
This commit is contained in:
parent
c50f5a3509
commit
47a0b3ccfa
@ -18,6 +18,7 @@ package ui
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/internal/graphics/opengl"
|
||||
@ -32,6 +33,9 @@ func Main() error {
|
||||
}
|
||||
|
||||
func Render(chError <-chan error) error {
|
||||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
|
||||
if chError == nil {
|
||||
return errors.New("ui: chError must not be nil")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user