|
@@ -2671,6 +2671,11 @@ void DisplayServerX11::cursor_set_custom_image(const Ref<Resource> &p_cursor, Cu
|
|
|
Ref<Image> image = texture->get_image();
|
|
|
|
|
|
ERR_FAIL_COND(!image.is_valid());
|
|
|
+ if (image->is_compressed()) {
|
|
|
+ image = image->duplicate(true);
|
|
|
+ Error err = image->decompress();
|
|
|
+ ERR_FAIL_COND_MSG(err != OK, "Couldn't decompress VRAM-compressed custom mouse cursor image. Switch to a lossless compression mode in the Import dock.");
|
|
|
+ }
|
|
|
|
|
|
// Create the cursor structure
|
|
|
XcursorImage *cursor_image = XcursorImageCreate(texture_size.width, texture_size.height);
|