mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-09-20 05:12:18 +02:00
parent
5be536c043
commit
a3146024c3
@ -205,7 +205,9 @@ func (i *Image) ReplacePixels(pix []byte) {
|
||||
delayedCommandsM.Lock()
|
||||
if needsToDelayCommands {
|
||||
delayedCommands = append(delayedCommands, func() {
|
||||
i.img.ReplacePixels(pix)
|
||||
copied := make([]byte, len(pix))
|
||||
copy(copied, pix)
|
||||
i.img.ReplacePixels(copied)
|
||||
})
|
||||
delayedCommandsM.Unlock()
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user