mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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