# SetOrientationAllowed

## Description

Sets which orientations the AGK will allow the app to rotate to. There are two portrait and two landscape orientations, one for the right way up and the ther for upside down. On platforms that can't rotate, like Windows or Mac, this command has no effect and the app will always be drawn right way up.
A value of 1 for each orientation will determine if the app will rotate when the device is held in that orientation. A value of 0 will keep the app at its last valid orientation.

## Definition

SetOrientationAllowed( portrait, portrait2, landscape, landscape2 )

void agk::SetOrientationAllowed( int portrait, int portrait2, int landscape, int landscape2 )

## Parameters

- portrait - The default device orientation.
- portrait2 - The upside down portrait orientation.
- landscape - The landscape orientation when the device is rotated left from its default position.
- landscape2 - The landscape orientation when the device is rotated right from its default position.