summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/godotsharp_dirs.cpp12
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp2
3 files changed, 5 insertions, 11 deletions
diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp
index 7cc2168b70..a0c2508b0d 100644
--- a/modules/mono/godotsharp_dirs.cpp
+++ b/modules/mono/godotsharp_dirs.cpp
@@ -57,7 +57,7 @@ String _get_expected_build_config() {
String _get_mono_user_dir() {
#ifdef TOOLS_ENABLED
if (EditorSettings::get_singleton()) {
- return EditorSettings::get_singleton()->get_settings_path().plus_file("mono");
+ return EditorSettings::get_singleton()->get_data_dir().plus_file("mono");
} else {
String settings_path;
@@ -68,19 +68,13 @@ String _get_mono_user_dir() {
// contain yourself
settings_path = exe_dir.plus_file("editor_data");
} else {
- if (OS::get_singleton()->has_environment("APPDATA")) {
- String app_data = OS::get_singleton()->get_environment("APPDATA").replace("\\", "/");
- settings_path = app_data.plus_file(String(_MKSTR(VERSION_SHORT_NAME)).capitalize());
- } else if (OS::get_singleton()->has_environment("HOME")) {
- String home = OS::get_singleton()->get_environment("HOME");
- settings_path = home.plus_file("." + String(_MKSTR(VERSION_SHORT_NAME)).to_lower());
- }
+ settings_path = OS::get_singleton()->get_data_path().plus_file(OS::get_singleton()->get_godot_dir_name());
}
return settings_path.plus_file("mono");
}
#else
- return OS::get_singleton()->get_data_dir().plus_file("mono");
+ return OS::get_singleton()->get_user_data_dir().plus_file("mono");
#endif
}
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index 1bee1115a6..eb34f9dd3f 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -41,7 +41,7 @@ void GDMonoField::set_value_raw(MonoObject *p_object, void *p_ptr) {
void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
#define SET_FROM_STRUCT_AND_BREAK(m_type) \
{ \
- const m_type &val = p_value.operator m_type(); \
+ const m_type &val = p_value.operator ::m_type(); \
MARSHALLED_OUT(m_type, val, raw); \
mono_field_set_value(p_object, mono_field, raw); \
break; \
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index 9c415951bb..8bc2bb5096 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -36,7 +36,7 @@ namespace GDMonoMarshal {
#define RETURN_BOXED_STRUCT(m_t, m_var_in) \
{ \
- const m_t &m_in = m_var_in->operator m_t(); \
+ const m_t &m_in = m_var_in->operator ::m_t(); \
MARSHALLED_OUT(m_t, m_in, raw); \
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(m_t), raw); \
}