mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
restorable: Don't record pixels when restoring is disabled
This commit is contained in:
parent
5be567d58f
commit
aad7bdc64d
@ -189,6 +189,11 @@ func (i *Image) ReplacePixels(pixels []byte, x, y, width, height int) {
|
||||
}
|
||||
i.image.ReplacePixels(pixels, x, y, width, height)
|
||||
|
||||
if !IsRestoringEnabled() {
|
||||
i.makeStale()
|
||||
return
|
||||
}
|
||||
|
||||
if x == 0 && y == 0 && width == w && height == h {
|
||||
if pixels != nil {
|
||||
if i.basePixels == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user