fixed the OS.has_feature() API, and added support for 32 and 64.

This commit is contained in:
Juan Linietsky 2017-10-02 16:38:39 -03:00
parent a848fa6cde
commit 3cadecf17b
9 changed files with 38 additions and 4 deletions

View file

@ -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;