mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 10:42:42 +01:00
internal/graphicsdriver/directx: early error check for Wine
Updates #2114
This commit is contained in:
parent
f8acd5e7ee
commit
e861080145
@ -1047,6 +1047,9 @@ func (g *Graphics) NewImage(width, height int) (graphicsdriver.Image, error) {
|
||||
}
|
||||
|
||||
layouts, _, _, totalBytes := g.device.GetCopyableFootprints(&desc, 0, 1, 0)
|
||||
if totalBytes == 1<<64-1 {
|
||||
return nil, fmt.Errorf("directx: GetCopyableFootprints returned an invalid total bytes")
|
||||
}
|
||||
|
||||
i := &Image{
|
||||
graphics: g,
|
||||
|
Loading…
Reference in New Issue
Block a user