internal/graphicsdriver/playstation5: bug fix: need to adjust image size

This commit is contained in:
Hajime Hoshi 2024-10-06 16:29:42 +09:00
parent a2490cceae
commit 5bcfdee75f

View File

@ -87,6 +87,8 @@ func (g *Graphics) SetVertices(vertices []float32, indices []uint32) error {
func (g *Graphics) NewImage(width, height int) (graphicsdriver.Image, error) {
var id C.int
width = graphics.InternalImageSize(width)
height = graphics.InternalImageSize(height)
if err := C.ebitengine_NewImage(&id, C.int(width), C.int(height)); !C.ebitengine_IsErrorNil(&err) {
return nil, newPlaystation5Error("(*playstation5.Graphics).NewImage", err)
}