Merge pull request #36110 from fire/vulkan_flip_screenshot

Don't flip screenshot.
This commit is contained in:
Rémi Verschelde 2020-02-11 19:33:33 +01:00 committed by GitHub
commit e9d9fef720
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2729,7 +2729,6 @@ void EditorNode::_save_screenshot(NodePath p_path) {
Viewport *viewport = EditorInterface::get_singleton()->get_editor_viewport()->get_viewport();
viewport->set_clear_mode(Viewport::CLEAR_MODE_ONLY_NEXT_FRAME);
Ref<Image> img = viewport->get_texture()->get_data();
img->flip_y();
viewport->set_clear_mode(Viewport::CLEAR_MODE_ALWAYS);
Error error = img->save_png(p_path);
ERR_FAIL_COND_MSG(error != OK, "Cannot save screenshot to file '" + p_path + "'.");