examples/vector: bug fix: wrong offscreen resetting

This commit is contained in:
Hajime Hoshi 2022-10-20 14:13:06 +09:00
parent 7d7f84a4ce
commit 885a3fa7cc

View File

@ -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
}