mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +01:00
restorable: Bug fix: Unlocking should happen after restoring
This commit is contained in:
parent
1f66c155ae
commit
9dd501720e
@ -78,13 +78,15 @@ func RestoreIfNeeded() error {
|
|||||||
//
|
//
|
||||||
// Between each frame, any image operations are not permitted, or stale images would remain when restoring
|
// Between each frame, any image operations are not permitted, or stale images would remain when restoring
|
||||||
// (#913).
|
// (#913).
|
||||||
firsttime := false
|
defer func() {
|
||||||
theImages.once.Do(func() {
|
firsttime := false
|
||||||
firsttime = true
|
theImages.once.Do(func() {
|
||||||
})
|
firsttime = true
|
||||||
if !firsttime {
|
})
|
||||||
theImages.m.Unlock()
|
if !firsttime {
|
||||||
}
|
theImages.m.Unlock()
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
if !needsRestoring() {
|
if !needsRestoring() {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user