Engine: fixed calculation of max vertical coordinate in letterbox mode