X Tutup
Skip to content

Fix incorrect failure code in screen_get_framebuffer_format#111883

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
eritschlSC:fix-framebuffer-format
Oct 21, 2025
Merged

Fix incorrect failure code in screen_get_framebuffer_format#111883
Repiteo merged 1 commit intogodotengine:masterfrom
eritschlSC:fix-framebuffer-format

Conversation

@eritschlSC
Copy link
Contributor

RenderingDevice::screen_get_framebuffer_format should return a value of type RenderingDevice::FramebufferFormatID which is an alias of int64_t but it returns Error::FAILED which has a value of 1. The compiler does not complain because both types are integers but 1 corresponds to a valid FramebufferFormatID, meaning a certain failure condition is missed.

This commit changes it to the correct value, INVALID_ID.

RenderingDevice::screen_get_framebuffer_format should return a value of
type RenderingDevice::FramebufferFormatID which is an alias of int64_t
but it returns Error::FAILED with a value of 1. The compiler does not
complain because both types are integers but 1 corresponds to a valid
FramebufferFormatID, meaning a certain failure condition is missed.

This commit changes it to the correct value, INVALID_ID.
@eritschlSC eritschlSC requested a review from a team as a code owner October 21, 2025 13:31
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From context this seems correct, probably a simple copy/paste error

@Repiteo Repiteo merged commit 618be07 into godotengine:master Oct 21, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 21, 2025

Thanks!

@eritschlSC eritschlSC deleted the fix-framebuffer-format branch January 23, 2026 09:31
@akien-mga akien-mga changed the title Fix incorrect failure code in screen_get_framebuffer_format Fix incorrect failure code in screen_get_framebuffer_format Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup