mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
internal/ui: bug fix: use CompareAndSwap
This commit is contained in:
parent
518e7f7022
commit
86ba7719eb
@ -190,10 +190,7 @@ func (g *globalState) error() error {
|
||||
}
|
||||
|
||||
func (g *globalState) setError(err error) {
|
||||
if g.err_.Load() != nil {
|
||||
return
|
||||
}
|
||||
g.err_.Store(err)
|
||||
g.err_.CompareAndSwap(nil, err)
|
||||
}
|
||||
|
||||
func (g *globalState) fpsMode() FPSModeType {
|
||||
|
Loading…
Reference in New Issue
Block a user