forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAndroidCompatibility.cs
More file actions
38 lines (32 loc) · 1.26 KB
/
Copy pathAndroidCompatibility.cs
File metadata and controls
38 lines (32 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System.Linq;
using Android.OS;
namespace Microsoft.Xna.Framework
{
/// <summary>
/// Properties that change from how XNA works by default
/// </summary>
public static class AndroidCompatibility
{
/// <summary>
/// Because the Kindle Fire devices default orientation is fliped by 180 degrees from all the other android devices
/// on the market we need to do some special processing to make sure that LandscapeLeft is the correct way round.
/// This list contains all the Build.Model strings of the effected devices, it should be added to if and when
/// more devices exhibit the same issues.
/// </summary>
private static readonly string[] Kindles = new[] { "KFTT", "KFJWI", "KFJWA", "KFSOWI", "KFTHWA", "KFTHWI", "KFAPWA", "KFAPWI" };
public enum ESVersions
{
v1_1,
v2_0
}
static AndroidCompatibility()
{
ScaleImageToPowerOf2 = true;
ESVersion = ESVersions.v2_0;
FlipLandscape = Kindles.Contains(Build.Model);
}
public static bool ScaleImageToPowerOf2 { get; set; }
public static ESVersions ESVersion { get; set; }
public static bool FlipLandscape { get; private set;}
}
}