Merge pull request #100372 from Calinou/os-add-get-version-alias
Add `OS.get_version_alias()` to return a human-readable Windows/macOS version number
This commit is contained in:
commit
a7fa0528bb
11 changed files with 105 additions and 5 deletions
|
|
@ -424,6 +424,10 @@ String OS::get_version() const {
|
|||
return ::OS::get_singleton()->get_version();
|
||||
}
|
||||
|
||||
String OS::get_version_alias() const {
|
||||
return ::OS::get_singleton()->get_version_alias();
|
||||
}
|
||||
|
||||
Vector<String> OS::get_video_adapter_driver_info() const {
|
||||
return ::OS::get_singleton()->get_video_adapter_driver_info();
|
||||
}
|
||||
|
|
@ -680,6 +684,7 @@ void OS::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("get_name"), &OS::get_name);
|
||||
ClassDB::bind_method(D_METHOD("get_distribution_name"), &OS::get_distribution_name);
|
||||
ClassDB::bind_method(D_METHOD("get_version"), &OS::get_version);
|
||||
ClassDB::bind_method(D_METHOD("get_version_alias"), &OS::get_version_alias);
|
||||
ClassDB::bind_method(D_METHOD("get_cmdline_args"), &OS::get_cmdline_args);
|
||||
ClassDB::bind_method(D_METHOD("get_cmdline_user_args"), &OS::get_cmdline_user_args);
|
||||
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ public:
|
|||
String get_name() const;
|
||||
String get_distribution_name() const;
|
||||
String get_version() const;
|
||||
String get_version_alias() const;
|
||||
Vector<String> get_cmdline_args();
|
||||
Vector<String> get_cmdline_user_args();
|
||||
|
||||
|
|
|
|||
|
|
@ -216,6 +216,7 @@ public:
|
|||
virtual String get_identifier() const;
|
||||
virtual String get_distribution_name() const = 0;
|
||||
virtual String get_version() const = 0;
|
||||
virtual String get_version_alias() const { return get_version(); }
|
||||
virtual List<String> get_cmdline_args() const { return _cmdline; }
|
||||
virtual List<String> get_cmdline_user_args() const { return _user_args; }
|
||||
virtual List<String> get_cmdline_platform_args() const { return List<String>(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue