diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/color.cpp | 2 | ||||
-rw-r--r-- | core/image.cpp | 6 | ||||
-rw-r--r-- | core/message_queue.cpp | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/core/color.cpp b/core/color.cpp index 5cbe02067e..1baa8af45d 100644 --- a/core/color.cpp +++ b/core/color.cpp @@ -511,7 +511,7 @@ Color Color::from_hsv(float p_h, float p_s, float p_v, float p_a) const { // FIXME: Remove once Godot 3.1 has been released float Color::gray() const { - WARN_DEPRECATED_MSG("Color.gray() is deprecated and will be removed in a future version. Use Color.get_v() for a better grayscale approximation."); + WARN_DEPRECATED_MSG("'Color.gray()' is deprecated and will be removed in a future version. Use 'Color.v' for a better grayscale approximation."); return (r + g + b) / 3.0; } diff --git a/core/image.cpp b/core/image.cpp index 18d0653bae..f43c26ab19 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -421,6 +421,8 @@ void Image::convert(Format p_new_format) { if (p_new_format == format) return; + ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot convert image when it is locked."); + if (format > FORMAT_RGBE9995 || p_new_format > FORMAT_RGBE9995) { ERR_FAIL_MSG("Cannot convert to <-> from compressed formats. Use compress() and decompress() instead."); @@ -880,8 +882,8 @@ void Image::resize_to_po2(bool p_square) { void Image::resize(int p_width, int p_height, Interpolation p_interpolation) { ERR_FAIL_COND_MSG(data.size() == 0, "Cannot resize image before creating it, use create() or create_from_data() first."); - ERR_FAIL_COND_MSG(!_can_modify(format), "Cannot resize in compressed or custom image formats."); + ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot resize image when it is locked."); bool mipmap_aware = p_interpolation == INTERPOLATE_TRILINEAR /* || p_interpolation == INTERPOLATE_TRICUBIC */; @@ -2063,6 +2065,7 @@ void Image::blit_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const Po ERR_FAIL_COND(dsize == 0); ERR_FAIL_COND(srcdsize == 0); ERR_FAIL_COND(format != p_src->format); + ERR_FAIL_COND_MSG(!_can_modify(format), "Cannot blit_rect in compressed or custom image formats."); Rect2i clipped_src_rect = Rect2i(0, 0, p_src->width, p_src->height).clip(p_src_rect); @@ -2283,6 +2286,7 @@ void Image::blend_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, c } void Image::fill(const Color &c) { + ERR_FAIL_COND_MSG(!_can_modify(format), "Cannot fill in compressed or custom image formats."); lock(); diff --git a/core/message_queue.cpp b/core/message_queue.cpp index d130934826..64ceec5ee4 100644 --- a/core/message_queue.cpp +++ b/core/message_queue.cpp @@ -52,7 +52,7 @@ Error MessageQueue::push_call(ObjectID p_id, const StringName &p_method, const V type = ObjectDB::get_instance(p_id)->get_class(); print_line("Failed method: " + type + ":" + p_method + " target ID: " + itos(p_id)); statistics(); - ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings."); + ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "Message queue out of memory. Try increasing 'memory/limits/message_queue/max_size_kb' in project settings."); } Message *msg = memnew_placement(&buffer[buffer_end], Message); @@ -102,7 +102,7 @@ Error MessageQueue::push_set(ObjectID p_id, const StringName &p_prop, const Vari type = ObjectDB::get_instance(p_id)->get_class(); print_line("Failed set: " + type + ":" + p_prop + " target ID: " + itos(p_id)); statistics(); - ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings."); + ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "Message queue out of memory. Try increasing 'memory/limits/message_queue/max_size_kb' in project settings."); } Message *msg = memnew_placement(&buffer[buffer_end], Message); @@ -131,7 +131,7 @@ Error MessageQueue::push_notification(ObjectID p_id, int p_notification) { if ((buffer_end + room_needed) >= buffer_size) { print_line("Failed notification: " + itos(p_notification) + " target ID: " + itos(p_id)); statistics(); - ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings."); + ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "Message queue out of memory. Try increasing 'memory/limits/message_queue/max_size_kb' in project settings."); } Message *msg = memnew_placement(&buffer[buffer_end], Message); |