mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 03:02:49 +01:00
restorable: Bug fix: Lock before resolving stale states
This commit is contained in:
parent
9dd501720e
commit
14ce0c1bcb
@ -57,7 +57,7 @@ var theImages = &images{
|
|||||||
// ResolveStaleImages is intended to be called at the end of a frame.
|
// ResolveStaleImages is intended to be called at the end of a frame.
|
||||||
func ResolveStaleImages() {
|
func ResolveStaleImages() {
|
||||||
// Until the begin o the frame (by RestoreIfNeeded, any operations are locked.
|
// Until the begin o the frame (by RestoreIfNeeded, any operations are locked.
|
||||||
defer theImages.m.Lock()
|
theImages.m.Lock()
|
||||||
|
|
||||||
graphicscommand.FlushCommands()
|
graphicscommand.FlushCommands()
|
||||||
if !needsRestoring() {
|
if !needsRestoring() {
|
||||||
|
Loading…
Reference in New Issue
Block a user