In my case, I would like my game to be playable only in landscape mode. However, I would obviously like it to be cross compatible. Does this logic work?
agk::SetOrientationAllowed(0,0,1,0); //Makes it so the game can only be played in landscape mode
int DeviceHeight = agk::GetDeviceHeight();
int DeviceWidth = agk::GetDeviceWidth();
if (DeviceHeight > DeviceWidth) //If given values were from portriat orientation
{
agk::SetVirtualResolution (DeviceWidth,DeviceHeight);
}
else //If given values were from landscape orientation
{
agk::SetVirtualResolution (DeviceHeight,DeviceWidth);
}
Notice that I switched height and width in the SetVirtualResolution command if height is larger than width. The big question here is, is 0,0 the top left corner still?