This function can be used to set the height of the given view port. You give the view port index (from 0 to 7) and the new height to use.
view_set_hport(view_port, h)
| Argument | Description |
|---|---|
| view_port | The view port to target (0 - 7) |
| h | The new height (in pixels) |
Real
if view_get_hport(0) != (display_get_height () / 2)
{
view_set_hport(0, display_get_height() / 2);
}
The above code will check the height of the view port[0] and if it is not half of the display height it is set to that value.