mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
parent
b6bc683991
commit
c92ccfff79
@ -45,6 +45,13 @@ func max(a, b int) int {
|
||||
return b
|
||||
}
|
||||
|
||||
func min(a, b int) int {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func init() {
|
||||
hooks.AppendHookOnBeforeUpdate(func() error {
|
||||
backendsM.Lock()
|
||||
@ -686,7 +693,9 @@ func BeginFrame() error {
|
||||
panic("shareable: all the images must be not-shared before the game starts")
|
||||
}
|
||||
minSize = 1024
|
||||
maxSize = max(minSize, restorable.MaxImageSize())
|
||||
|
||||
// The maximum size is 8192 no matter what the available sizes are (#1453).
|
||||
maxSize = min(max(minSize, restorable.MaxImageSize()), 8192)
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user