Commit Graph

1 Commits

Author SHA1 Message Date
Hajime Hoshi
6e968558b1 internal/ui: bug fix: setRunning(true) must be called after the main thread is set
Some functions like ebiten.SetCursorMode use `running` to detect
whether the game starts or not. If the game starts, the main thread
must exist, but there was a timing when `running` was true but the
main thread didn't exist.

This change fixes this issue by changing the timing to call
`setRunning(true)` after the main thread initialization and before
`initOnMainThread`. `initOnMainThread` assumes that `running` is
true.

Closes #2742
2023-09-02 04:24:51 +09:00