os_set_orientation_lock

This function changes the orientations that are allowed for the game. You can enable or disable landscape and portrait orientations separately.

Calling this function will disable the flipped versions of both orientations, which are found in the Android / iOS Game Options.

 

Syntax:

os_set_orientation_lock(landscape_enable, portrait_enable);

ArgumentTypeDescription
landscape_enableBooleanSet to true or false to enable or disable landscape orientations.
portrait_enableBooleanSet to true or false to enable or disable portrait orientations.

 

Returns:

N/A

 

Example:

os_set_orientation_lock(true, true);

This enables both landscape and portrait orientations.