mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/graphicscommand: bug fix: test failures on Windows
This commit is contained in:
parent
bcc5dc1703
commit
bf6a5415cf
@ -179,6 +179,7 @@ func (q *commandQueue) flush(graphicsDriver graphicsdriver.Graphics, present boo
|
|||||||
if err := graphicsDriver.Begin(); err != nil {
|
if err := graphicsDriver.Begin(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
var screenRendered bool
|
||||||
cs := q.commands
|
cs := q.commands
|
||||||
for len(cs) > 0 {
|
for len(cs) > 0 {
|
||||||
nv := 0
|
nv := 0
|
||||||
@ -194,6 +195,9 @@ func (q *commandQueue) flush(graphicsDriver graphicsdriver.Graphics, present boo
|
|||||||
}
|
}
|
||||||
nv += dtc.numVertices()
|
nv += dtc.numVertices()
|
||||||
ne += dtc.numIndices()
|
ne += dtc.numIndices()
|
||||||
|
if dtc.dst.screen {
|
||||||
|
screenRendered = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
nc++
|
nc++
|
||||||
}
|
}
|
||||||
@ -219,7 +223,7 @@ func (q *commandQueue) flush(graphicsDriver graphicsdriver.Graphics, present boo
|
|||||||
}
|
}
|
||||||
cs = cs[nc:]
|
cs = cs[nc:]
|
||||||
}
|
}
|
||||||
if err := graphicsDriver.End(present); err != nil {
|
if err := graphicsDriver.End(present && screenRendered); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user