mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphicscommand: Bug fix: restorable should be enabled if not sure
init function in restorable package might reach this condition, and for fail-safe, restoring should be enabled.
This commit is contained in:
parent
83254d30d9
commit
3ab56778e7
@ -30,7 +30,9 @@ func SetGraphicsDriver(driver driver.Graphics) {
|
||||
|
||||
func NeedsRestoring() bool {
|
||||
if theGraphicsDriver == nil {
|
||||
return false
|
||||
// This happens on initialization.
|
||||
// Return true for fail-safe
|
||||
return true
|
||||
}
|
||||
return theGraphicsDriver.NeedsRestoring()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user