summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/config/project_settings.cpp7
-rw-r--r--core/config/project_settings.h1
-rw-r--r--core/os/os.cpp9
-rw-r--r--core/string/ustring.cpp2
4 files changed, 16 insertions, 3 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index 562cbbdd27..f37e7f5956 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -42,6 +42,8 @@
#include "core/os/os.h"
#include "core/variant/variant_parser.h"
+const String ProjectSettings::PROJECT_DATA_DIR_NAME_SUFFIX = "godot";
+
ProjectSettings *ProjectSettings::singleton = nullptr;
ProjectSettings *ProjectSettings::get_singleton() {
@@ -521,7 +523,8 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
}
// Updating the default value after the project settings have loaded.
- project_data_dir_name = GLOBAL_GET("application/config/project_data_dir_name");
+ bool use_hidden_directory = GLOBAL_GET("application/config/use_hidden_project_data_directory");
+ project_data_dir_name = (use_hidden_directory ? "." : "") + PROJECT_DATA_DIR_NAME_SUFFIX;
// Using GLOBAL_GET on every block for compressing can be slow, so assigning here.
Compression::zstd_long_distance_matching = GLOBAL_GET("compression/formats/zstd/long_distance_matching");
@@ -1094,7 +1097,7 @@ ProjectSettings::ProjectSettings() {
custom_prop_info["application/run/main_scene"] = PropertyInfo(Variant::STRING, "application/run/main_scene", PROPERTY_HINT_FILE, "*.tscn,*.scn,*.res");
GLOBAL_DEF("application/run/disable_stdout", false);
GLOBAL_DEF("application/run/disable_stderr", false);
- project_data_dir_name = GLOBAL_DEF_RST("application/config/project_data_dir_name", ".godot");
+ GLOBAL_DEF_RST("application/config/use_hidden_project_data_directory", true);
GLOBAL_DEF("application/config/use_custom_user_dir", false);
GLOBAL_DEF("application/config/custom_user_dir_name", "");
GLOBAL_DEF("application/config/project_settings_override", "");
diff --git a/core/config/project_settings.h b/core/config/project_settings.h
index 82f04b94df..ca37401751 100644
--- a/core/config/project_settings.h
+++ b/core/config/project_settings.h
@@ -42,6 +42,7 @@ class ProjectSettings : public Object {
public:
typedef Map<String, Variant> CustomMap;
+ static const String PROJECT_DATA_DIR_NAME_SUFFIX;
enum {
//properties that are not for built in values begin from this value, so builtin ones are displayed first
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 7404ffdcd5..5892f91ff3 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -431,6 +431,15 @@ bool OS::has_feature(const String &p_feature) {
if (p_feature == "arm") {
return true;
}
+#elif defined(__riscv)
+#if __riscv_xlen == 8
+ if (p_feature == "rv64") {
+ return true;
+ }
+#endif
+ if (p_feature == "riscv") {
+ return true;
+ }
#endif
if (_check_internal_feature_support(p_feature)) {
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index b1e685651e..397743fb6e 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -2178,7 +2178,7 @@ int64_t String::bin_to_int() const {
s++;
}
- if (len > 2 && s[0] == '0' && s[1] == 'b') {
+ if (len > 2 && s[0] == '0' && lower_case(s[1]) == 'b') {
s += 2;
}