summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/CodeEdit.xml4
-rw-r--r--editor/editor_settings.cpp2
-rw-r--r--editor/editor_themes.cpp3
-rw-r--r--modules/vorbis/resource_importer_ogg_vorbis.cpp22
-rw-r--r--scene/resources/default_theme/default_theme.cpp4
-rw-r--r--servers/physics_server_2d.cpp2
-rw-r--r--servers/physics_server_3d.cpp2
7 files changed, 27 insertions, 12 deletions
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index 09696d4d2a..0e4e6ed258 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -589,7 +589,7 @@
<theme_item name="completion_font_color" data_type="color" type="Color" default="Color(0.67, 0.67, 0.67, 1)">
Font [Color] for the code completion popup.
</theme_item>
- <theme_item name="completion_scroll_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="completion_scroll_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.29)">
[Color] of the scrollbar in the code completion popup.
</theme_item>
<theme_item name="completion_selected_color" data_type="color" type="Color" default="Color(0.26, 0.26, 0.27, 1)">
@@ -640,7 +640,7 @@
<theme_item name="completion_max_width" data_type="constant" type="int" default="50">
Max width of options in the code completion popup. Options longer then this will be cut off.
</theme_item>
- <theme_item name="completion_scroll_width" data_type="constant" type="int" default="3">
+ <theme_item name="completion_scroll_width" data_type="constant" type="int" default="6">
Width of the scrollbar in the code completion popup.
</theme_item>
<theme_item name="line_spacing" data_type="constant" type="int" default="4">
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 0c3f7287a5..c93a94e974 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -741,7 +741,7 @@ void EditorSettings::_load_godot2_text_editor_theme() {
_initial_set("text_editor/theme/highlighting/completion_background_color", Color(0.17, 0.16, 0.2));
_initial_set("text_editor/theme/highlighting/completion_selected_color", Color(0.26, 0.26, 0.27));
_initial_set("text_editor/theme/highlighting/completion_existing_color", Color(0.87, 0.87, 0.87, 0.13));
- _initial_set("text_editor/theme/highlighting/completion_scroll_color", Color(1, 1, 1));
+ _initial_set("text_editor/theme/highlighting/completion_scroll_color", Color(1, 1, 1, 0.29));
_initial_set("text_editor/theme/highlighting/completion_font_color", Color(0.67, 0.67, 0.67));
_initial_set("text_editor/theme/highlighting/text_color", Color(0.67, 0.67, 0.67));
_initial_set("text_editor/theme/highlighting/line_number_color", Color(0.67, 0.67, 0.67, 0.4));
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 15664bbc0b..05aa638a4b 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1544,7 +1544,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color completion_background_color = dark_theme ? base_color : background_color;
const Color completion_selected_color = alpha1;
const Color completion_existing_color = alpha2;
- const Color completion_scroll_color = alpha1;
+ // Same opacity as the scroll grabber editor icon.
+ const Color completion_scroll_color = Color(mono_value, mono_value, mono_value, 0.29);
const Color completion_font_color = font_color;
const Color text_color = font_color;
const Color line_number_color = dim_color;
diff --git a/modules/vorbis/resource_importer_ogg_vorbis.cpp b/modules/vorbis/resource_importer_ogg_vorbis.cpp
index ccd463fd52..d12e65a96a 100644
--- a/modules/vorbis/resource_importer_ogg_vorbis.cpp
+++ b/modules/vorbis/resource_importer_ogg_vorbis.cpp
@@ -136,11 +136,11 @@ Error ResourceImporterOGGVorbis::import(const String &p_source_file, const Strin
// Have a page now.
if (!initialized_stream) {
- ogg_stream_init(&stream_state, ogg_page_serialno(&page));
- ERR_FAIL_COND_V_MSG((err = ogg_stream_check(&stream_state)), Error::ERR_INVALID_DATA, "Ogg stream error " + itos(err));
+ if (ogg_stream_init(&stream_state, ogg_page_serialno(&page))) {
+ ERR_FAIL_V_MSG(Error::ERR_OUT_OF_MEMORY, "Failed allocating memory for OGG Vorbis stream.");
+ }
initialized_stream = true;
}
- ERR_FAIL_COND_V_MSG((err = ogg_stream_check(&stream_state)), Error::ERR_INVALID_DATA, "Ogg stream error " + itos(err));
ogg_stream_pagein(&stream_state, &page);
ERR_FAIL_COND_V_MSG((err = ogg_stream_check(&stream_state)), Error::ERR_INVALID_DATA, "Ogg stream error " + itos(err));
int desync_iters = 0;
@@ -160,10 +160,12 @@ Error ResourceImporterOGGVorbis::import(const String &p_source_file, const Strin
break;
}
if (packet_count == 0 && vorbis_synthesis_idheader(&packet) == 0) {
- WARN_PRINT("Found a non-vorbis-header packet in a header position");
+ print_verbose("Found a non-vorbis-header packet in a header position");
// Clearly this logical stream is not a vorbis stream, so destroy it and try again with the next page.
- ogg_stream_destroy(&stream_state);
- initialized_stream = false;
+ if (initialized_stream) {
+ ogg_stream_clear(&stream_state);
+ initialized_stream = false;
+ }
break;
}
granule_pos = packet.granulepos;
@@ -178,6 +180,14 @@ Error ResourceImporterOGGVorbis::import(const String &p_source_file, const Strin
ogg_packet_sequence->push_page(granule_pos, packet_data);
}
}
+ if (initialized_stream) {
+ ogg_stream_clear(&stream_state);
+ }
+ ogg_sync_clear(&sync_state);
+
+ if (ogg_packet_sequence->get_packet_granule_positions().is_empty()) {
+ ERR_FAIL_V_MSG(Error::ERR_FILE_CORRUPT, "OGG Vorbis decoding failed. Check that your data is a valid OGG Vorbis audio stream.");
+ }
ogg_vorbis_stream->set_packet_sequence(ogg_packet_sequence);
ogg_vorbis_stream->set_loop(loop);
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index a83e1e3128..6d5d1fee5e 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -466,7 +466,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, Ref<Te
theme->set_color("completion_background_color", "CodeEdit", Color(0.17, 0.16, 0.2));
theme->set_color("completion_selected_color", "CodeEdit", Color(0.26, 0.26, 0.27));
theme->set_color("completion_existing_color", "CodeEdit", Color(0.87, 0.87, 0.87, 0.13));
- theme->set_color("completion_scroll_color", "CodeEdit", control_font_pressed_color);
+ theme->set_color("completion_scroll_color", "CodeEdit", control_font_pressed_color * Color(1, 1, 1, 0.29));
theme->set_color("completion_font_color", "CodeEdit", Color(0.67, 0.67, 0.67));
theme->set_color("font_color", "CodeEdit", control_font_color);
theme->set_color("font_selected_color", "CodeEdit", Color(0, 0, 0));
@@ -490,7 +490,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, Ref<Te
theme->set_constant("completion_lines", "CodeEdit", 7);
theme->set_constant("completion_max_width", "CodeEdit", 50);
- theme->set_constant("completion_scroll_width", "CodeEdit", 3);
+ theme->set_constant("completion_scroll_width", "CodeEdit", 6);
theme->set_constant("line_spacing", "CodeEdit", 4 * scale);
theme->set_constant("outline_size", "CodeEdit", 0);
diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp
index d8f2a2a780..45816e3244 100644
--- a/servers/physics_server_2d.cpp
+++ b/servers/physics_server_2d.cpp
@@ -336,6 +336,8 @@ Dictionary PhysicsDirectSpaceState2D::_intersect_ray(const Ref<PhysicsRayQueryPa
}
Array PhysicsDirectSpaceState2D::_intersect_point(const Ref<PhysicsPointQueryParameters2D> &p_point_query, int p_max_results) {
+ ERR_FAIL_COND_V(p_point_query.is_null(), Array());
+
Vector<ShapeResult> ret;
ret.resize(p_max_results);
diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp
index 8fafd07f87..fc119e49e9 100644
--- a/servers/physics_server_3d.cpp
+++ b/servers/physics_server_3d.cpp
@@ -339,6 +339,8 @@ Dictionary PhysicsDirectSpaceState3D::_intersect_ray(const Ref<PhysicsRayQueryPa
}
Array PhysicsDirectSpaceState3D::_intersect_point(const Ref<PhysicsPointQueryParameters3D> &p_point_query, int p_max_results) {
+ ERR_FAIL_COND_V(p_point_query.is_null(), Array());
+
Vector<ShapeResult> ret;
ret.resize(p_max_results);