mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-24 18:02:02 +01:00
examples/vector: bug fix: wrong offscreen resetting
This commit is contained in:
parent
7d7f84a4ce
commit
885a3fa7cc
@ -320,7 +320,7 @@ func (g *Game) Update() error {
|
||||
func (g *Game) Draw(screen *ebiten.Image) {
|
||||
if g.offscreen != nil {
|
||||
w, h := screen.Size()
|
||||
if ow, oh := g.offscreen.Size(); ow != w || oh != h {
|
||||
if ow, oh := g.offscreen.Size(); ow != w*2 || oh != h*2 {
|
||||
g.offscreen.Dispose()
|
||||
g.offscreen = nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user