os_version


描述

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:

操作系统 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)
Lollipop (5.0 - 5.1.1)
Marshmallow (6.0 - 6.0.1)
Nougat (7.0 - 7.11)
Oreo (8.0 - 8.11)
Pie (9.0)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
21 - 22
23
24 - 25
26 - 27
28
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)
iOS 8 (8.0)
iOS 8 (8.1)
iOS 8 (8.2)
iOS 8 (8.3)
iOS 8 (8.4)
iOS 8 (8.4.1)
iOS 9 (9.0)
iOS 9 (9.0.1)
iOS 9 (9.0.2)
iOS 9 (9.1)
iOS 9 (9.2)
iOS 9 (9.2.1)
iOS 9 (9.3)
iOS 10 (10.0)
iOS 10 (10.1)
iOS 10 (10.2)
iOS 10 (10.3)
iOS 11 (11.0)
iOS 11 (11.1)
iOS 11 (11.2)
iOS 11 (11.3)
iOS 11 (11.4)
iOS 12 (12.0)
50335747
67117057
83890177
100663297
100663298
100667392
117440516
117444608
134217728
134221824
134225920
134230016
134234112
134234113
150994944
150994945
150994946
150999040
151003136
151003137
151007232
167772160
167776256
167780352
167784448
184549376
184553472
184557568
184561664
184565760
201326592
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)
Yosemite (10.10)
El Capitan (10.11)
Sierra (10.12)
High Sierra (10.13)
Mojave (10.14)
167772164
167776261
167780360
167784457
167788555
167792648
167796744
167800837
167804930
167809025
167813120
167817216
167821312
167825408
167829504
Windows
(the return value is calculated as:
majorVersion * 65536 + minorVersion)
Windows 2000 (5.0)
Windows XP (5.1)
Windows XP 64-Bit Edition (5.2)
Windows Server 2003 (5.2)
Windows Server 2003 R2 (5.2)
Windows Vista (6.0)
Windows Server 2008 (6.0)
Windows Server 2008 R2 (6.1)
Windows 7 (6.1)
Windows Server 2012 (6.2)
Windows 8 (6.2)
Windows 8.1 (6.3)
Windows 10 (10.0)<.nt>
327680
327681
327682
327682
327682
393216
393216
393217
393217
393218
393218
393219
655360
NOTE: Should you require further information about the Windows OS you can use the environment_get_variable.


语法:

os_version


返回:

Real(实数)


例如:

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.