I have tried the following code and it works perfectly.
If item.width <> Invalid and item.height <> Invalid Then
print "Setting video stretch"
displaySize = CreateObject("roDeviceInfo").GetDisplaySize()
rect = CreateObject("roAssociativeArray")
rect.w = displaySize.w
rect.h = Int(displaySize.w * item.height / item.width)
rect.x = 0
rect.y = Int((item.height - rect.h ) /2)
print " { x= ", rect.x, ", y= ", rect.y, ", w= ", rect.w, ", h= ", rect.h, " }"
If rect.h > displaySize.h Then
video.SetDestinationRect(rect)
End If
End If
But it seems that this code is broken in 2.9 :evil: Any ideas?