Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ChooseOrientation()

static DisplayOrientation Microsoft.Xna.Framework.Helpers.ChooseOrientation ( DisplayOrientation orientation,
int width,
int height,
bool allowLandscapeLeftAndRight )
inlinestatic

Definition at line 209 of file Helpers.cs.

210 {
211 if ((orientation & (DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight | DisplayOrientation.Portrait)) != 0)
212 {
213 return orientation;
214 }
215 if (width > height)
216 {
217 if (allowLandscapeLeftAndRight)
218 {
219 return DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight;
220 }
221 return DisplayOrientation.LandscapeLeft;
222 }
223 return DisplayOrientation.Portrait;
224 }