mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
ui: Bug fix: userInterface.fullscreen() must be called from the main thread
This commit is contained in:
parent
b58dc26832
commit
78a58fd1ae
@ -247,6 +247,7 @@ func ScreenScale() float64 {
|
||||
return s
|
||||
}
|
||||
|
||||
// fullscreen must be called from the main thread.
|
||||
func (u *userInterface) fullscreen() bool {
|
||||
if !u.isRunning() {
|
||||
panic("not reached")
|
||||
@ -259,7 +260,12 @@ func IsFullscreen() bool {
|
||||
if !u.isRunning() {
|
||||
return u.isInitFullscreen()
|
||||
}
|
||||
return u.fullscreen()
|
||||
b := false
|
||||
_ = u.runOnMainThread(func() error {
|
||||
b = u.fullscreen()
|
||||
return nil
|
||||
})
|
||||
return b
|
||||
}
|
||||
|
||||
func SetFullscreen(fullscreen bool) {
|
||||
|
Loading…
Reference in New Issue
Block a user