os_version
Returns: Real
This variable will tell you the version number for the OS that
is running your game. For example, if you are running it on an iPad
with iOS 4 installed, os_version will be equal to
83890177.
The following table outlines the values that are returned:
Operating System | Version Name (version Number) | Return Value |
---|---|---|
Android | Cupcake (1.5) Donut (1.6) Eclair (2.0) Eclair (2.0.1) Eclair (2.1) Froyo (2.2.x) Gingerbread (2.3 - 2.3.2) Gingerbread (2.3.3 - 2.3.7) Honeycomb (3.0) Honeycomb (3.1) Honeycomb (3.2.x) Ice Cream Sandwich (4.0.1 - 4.0.2) Ice Cream Sandwich (4.0.3 - 4.0.4) Jelly Bean (4.1.x) Jelly Bean (4.2.x) Jelly Bean (4.3.x) KitKat (4.4.x) |
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
iOS The return value is calculated as: (major_version * 16777216) + (minor_version * 4096) + build_number |
iOS 3 (3.1.3) iOS 4 (4.2.1) iOS 5 (5.1.1) iOS 6 (6.0.1) iOS 6 (6.0.2) iOS 6 (6.1) iOS 7 (7.0.4) iOS 7 (7.1) |
50335747 67117057 83890177 100663297 100663298 100667392 117440516 117444608 |
Mac OS X The return value is calculated as: (major_version * 16777216) + (minor_version * 4096) + build_number |
Cheetah (10.0.4) Puma (10.1.5) Jaguar (10.2.8) Panther (10.3.9) Tiger (10.4.11) Leopard (10.5.8) Snow Leopard (10.6.8) Lion (10.7.5) Mountain Lion (10.8.2) Mavericks (10.9.1) |
167772164 167776261 167780360 167784457 167788555 167792648 167796744 167800837 167804930 167809025 |
Windows (the return value is calculated as: majorVersion * 65536 + minorVersion) |
Windows 8 (6.2) Windows Server 2012 (6.2) Windows 7 (6.1) Windows Server 2008 R2 (6.1) Windows Server 2008 (6.0) Windows Vista (6.0) Windows Server 2003 R2 (5.2) Windows Server 2003 (5.2) Windows XP 64-Bit Edition (5.2) Windows XP (5.1) Windows 2000 (5.0) |
393218 393218 393217 393217 393216 393216 327682 327682 327682 327681 327680 |
Windows Phone The return value is calculated as: majorVersion * 65536 + minorVersion |
Windows Phone 8 (8.0) Windows Phone 7.5 (7.1) Windows Phone 7 (7.0) |
524288 458753 458752 |
NOTE: Should you require further information about the
Windows OS you can use the environment_get_variable.
if os_type = os_android && os_version >10 global.GFX = 1;
The above code checks the os type and version number and they are both correct then the global variable is set to 1.