mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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)
|
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{
|
i := &Image{
|
||||||
graphics: g,
|
graphics: g,
|
||||||
|
Loading…
Reference in New Issue
Block a user