fixed the OS.has_feature() API, and added support for 32 and 64.
This commit is contained in:
parent
a848fa6cde
commit
3cadecf17b
9 changed files with 38 additions and 4 deletions
|
|
@ -494,7 +494,7 @@ int OS::get_power_percent_left() {
|
|||
return -1;
|
||||
}
|
||||
|
||||
bool OS::check_feature_support(const String &p_feature) {
|
||||
bool OS::has_feature(const String &p_feature) {
|
||||
|
||||
if (p_feature == get_name())
|
||||
return true;
|
||||
|
|
@ -506,6 +506,13 @@ bool OS::check_feature_support(const String &p_feature) {
|
|||
return true;
|
||||
#endif
|
||||
|
||||
if (sizeof(void *) == 8 && p_feature == "64") {
|
||||
return true;
|
||||
}
|
||||
if (sizeof(void *) == 4 && p_feature == "32") {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_check_internal_feature_support(p_feature))
|
||||
return true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue