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