mirror of
https://github.com/godotengine/godot.git
synced 2024-11-13 23:52:41 +00:00
Fix the fetching of images in CF_DIB format in DisplayServerWindows::clipboard_get_image
Fix the fetching of images from windows clipboard, if they're in CF_DIB format (e. g. by taking screenshots). Image::create_from_data was used with an instance of Image, but it's a static function, returning a new instance.
This commit is contained in:
parent
4e990cd7e5
commit
c1ec0360e9
@ -760,8 +760,7 @@ Ref<Image> DisplayServerWindows::clipboard_get_image() const {
|
||||
pba.append(rgbquad->rgbReserved);
|
||||
}
|
||||
}
|
||||
image.instantiate();
|
||||
image->create_from_data(info->biWidth, info->biHeight, false, Image::Format::FORMAT_RGBA8, pba);
|
||||
image = Image::create_from_data(info->biWidth, info->biHeight, false, Image::Format::FORMAT_RGBA8, pba);
|
||||
|
||||
GlobalUnlock(mem);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user