summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/oa_hash_map.h4
-rw-r--r--drivers/gles3/shader_compiler_gles3.cpp1
-rw-r--r--editor/editor_properties.cpp4
-rw-r--r--main/tests/test_oa_hash_map.cpp29
-rw-r--r--platform/android/build.gradle.template11
-rw-r--r--platform/android/java/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--scene/gui/control.cpp2
-rw-r--r--servers/visual/shader_types.cpp1
8 files changed, 44 insertions, 10 deletions
diff --git a/core/oa_hash_map.h b/core/oa_hash_map.h
index 3705762d6c..9840442519 100644
--- a/core/oa_hash_map.h
+++ b/core/oa_hash_map.h
@@ -125,7 +125,7 @@ private:
while (42) {
if (hashes[pos] == EMPTY_HASH) {
- _construct(pos, hash, p_key, p_value);
+ _construct(pos, hash, key, value);
return;
}
@@ -136,7 +136,7 @@ private:
if (hashes[pos] & DELETED_HASH_BIT) {
// we found a place where we can fit in!
- _construct(pos, hash, p_key, p_value);
+ _construct(pos, hash, key, value);
return;
}
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp
index dbc8507951..be36b41417 100644
--- a/drivers/gles3/shader_compiler_gles3.cpp
+++ b/drivers/gles3/shader_compiler_gles3.cpp
@@ -872,6 +872,7 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() {
actions[VS::SHADER_SPATIAL].renames["SCREEN_UV"] = "screen_uv";
actions[VS::SHADER_SPATIAL].renames["SCREEN_TEXTURE"] = "screen_texture";
actions[VS::SHADER_SPATIAL].renames["DEPTH_TEXTURE"] = "depth_buffer";
+ actions[VS::SHADER_SPATIAL].renames["DEPTH"] = "gl_FragDepth";
actions[VS::SHADER_SPATIAL].renames["ALPHA_SCISSOR"] = "alpha_scissor";
actions[VS::SHADER_SPATIAL].renames["OUTPUT_IS_SRGB"] = "SHADER_IS_SRGB";
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 6eba9a9b67..d078cfcc91 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -1779,7 +1779,7 @@ void EditorPropertyColor::_color_changed(const Color &p_color) {
void EditorPropertyColor::_popup_closed() {
- emit_signal("property_changed", get_edited_property(), picker->get_pick_color(), true);
+ emit_signal("property_changed", get_edited_property(), picker->get_pick_color(), false);
}
void EditorPropertyColor::_bind_methods() {
@@ -2380,7 +2380,7 @@ void EditorPropertyResource::update_property() {
if (res->get_name() != String()) {
assign->set_text(res->get_name());
} else if (res->get_path().is_resource_file()) {
- assign->set_text(res->get_name());
+ assign->set_text(res->get_path().get_file());
assign->set_tooltip(res->get_path());
} else {
assign->set_text(res->get_class());
diff --git a/main/tests/test_oa_hash_map.cpp b/main/tests/test_oa_hash_map.cpp
index 26e728d3aa..deaba285cf 100644
--- a/main/tests/test_oa_hash_map.cpp
+++ b/main/tests/test_oa_hash_map.cpp
@@ -92,6 +92,35 @@ MainLoop *test() {
}
}
+ // stress test / test for issue #22928
+ {
+ OAHashMap<int, int> map;
+ int dummy;
+ const int N = 1000;
+ uint32_t *keys = new uint32_t[N];
+
+ Math::seed(0);
+
+ // insert a couple of random keys (with a dummy value, which is ignored)
+ for (int i = 0; i < N; i++) {
+ keys[i] = Math::rand();
+ map.set(keys[i], dummy);
+
+ if (!map.lookup(keys[i], dummy))
+ OS::get_singleton()->print("could not find 0x%X despite it was just inserted!\n", unsigned(keys[i]));
+ }
+
+ // check whether the keys are still present
+ for (int i = 0; i < N; i++) {
+ if (!map.lookup(keys[i], dummy)) {
+ OS::get_singleton()->print("could not find 0x%X despite it has been inserted previously! (not checking the other keys, breaking...)\n", unsigned(keys[i]));
+ break;
+ }
+ }
+
+ delete[] keys;
+ }
+
return NULL;
}
} // namespace TestOAHashMap
diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template
index cc45fee95f..1603ea70d9 100644
--- a/platform/android/build.gradle.template
+++ b/platform/android/build.gradle.template
@@ -1,10 +1,11 @@
buildscript {
repositories {
+ google()
jcenter()
$$GRADLE_REPOSITORY_URLS$$
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.3.3'
+ classpath 'com.android.tools.build:gradle:3.2.0'
$$GRADLE_CLASSPATH$$
}
}
@@ -32,7 +33,7 @@ android {
}
compileSdkVersion 27
- buildToolsVersion "27.0.3"
+ buildToolsVersion "28.0.3"
useLibrary 'org.apache.http.legacy'
packagingOptions {
@@ -75,9 +76,11 @@ android {
$$GRADLE_JNI_DIRS$$
]
}
+
applicationVariants.all { variant ->
- // ApplicationVariant is undocumented, but this method is widely used; may break with another version of the Android Gradle plugin
- variant.outputs.get(0).setOutputFile(new File("${projectDir}/../../../bin", "android_${variant.name}.apk"))
+ variant.outputs.all { output ->
+ output.outputFileName = "../../../../../../../bin/android_${variant.name}.apk"
+ }
}
}
diff --git a/platform/android/java/gradle/wrapper/gradle-wrapper.properties b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
index fe37fa74a9..6fb3a79546 100644
--- a/platform/android/java/gradle/wrapper/gradle-wrapper.properties
+++ b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index effcd0abee..e155d0ef86 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -769,7 +769,7 @@ void Control::force_drag(const Variant &p_data, Control *p_control) {
void Control::set_drag_preview(Control *p_control) {
ERR_FAIL_COND(!is_inside_tree());
- ERR_FAIL_COND(get_viewport()->gui_is_dragging());
+ ERR_FAIL_COND(!get_viewport()->gui_is_dragging());
get_viewport()->_gui_set_drag_preview(this, p_control);
}
diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp
index 57e8d86468..69acf52e17 100644
--- a/servers/visual/shader_types.cpp
+++ b/servers/visual/shader_types.cpp
@@ -109,6 +109,7 @@ ShaderTypes::ShaderTypes() {
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["EMISSION"] = ShaderLanguage::TYPE_VEC3;
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SCREEN_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["DEPTH_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["DEPTH"] = ShaderLanguage::TYPE_FLOAT;
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2;
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["POINT_COORD"] = constt(ShaderLanguage::TYPE_VEC2);
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ALPHA_SCISSOR"] = ShaderLanguage::TYPE_FLOAT;