mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-27 04:08:53 +01:00
internal/graphicscommand: switch the queue before flushing
This is a preparation to do something (e.g. handling inputs) during being blocked by Flush. Updates #1704
This commit is contained in:
parent
53525342b1
commit
fd1083808c
@ -311,10 +311,11 @@ func (q *commandQueue) flush(graphicsDriver graphicsdriver.Graphics, endFrame bo
|
|||||||
// If endFrame is true, the current screen might be used to present.
|
// If endFrame is true, the current screen might be used to present.
|
||||||
func FlushCommands(graphicsDriver graphicsdriver.Graphics, endFrame bool, swapBuffersForGL func()) error {
|
func FlushCommands(graphicsDriver graphicsdriver.Graphics, endFrame bool, swapBuffersForGL func()) error {
|
||||||
flushImageBuffers()
|
flushImageBuffers()
|
||||||
if err := currentCommandQueue().Flush(graphicsDriver, endFrame, swapBuffersForGL); err != nil {
|
q := currentCommandQueue()
|
||||||
|
switchCommandQueue()
|
||||||
|
if err := q.Flush(graphicsDriver, endFrame, swapBuffersForGL); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
switchCommandQueue()
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user