mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
Revert an unreasonable change at 633ee409
This commit is contained in:
parent
9178b488a1
commit
ccf7b0c159
@ -64,16 +64,10 @@ func Init() {
|
|||||||
|
|
||||||
func ExecOnUIThread(f func()) {
|
func ExecOnUIThread(f func()) {
|
||||||
ch := make(chan struct{})
|
ch := make(chan struct{})
|
||||||
/*currentUI.funcs <- func() {
|
currentUI.funcs <- func() {
|
||||||
defer close(ch)
|
defer close(ch)
|
||||||
f()
|
f()
|
||||||
}*/
|
}
|
||||||
go func() {
|
|
||||||
defer close(ch)
|
|
||||||
runtime.LockOSThread()
|
|
||||||
currentUI.window.MakeContextCurrent()
|
|
||||||
f()
|
|
||||||
}()
|
|
||||||
<-ch
|
<-ch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user