Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #12000: When viewport is set to camera and switched to SizedFul… #12861

Merged
merged 2 commits into from
Apr 6, 2024

Conversation

LuisFigueiredo73
Copy link
Contributor

Objective

Solution

  • The fix consists of matching the size of the viewport to the lower size of the window ( if the x value of the window is lower, I update only the x value of the viewport, same for the y value). Also added a test to show that it does not panic anymore.

…o SizedFullscreen, panic may occur

When viewport is set to the same size as the window on creation, when adjusting to SizedFullscreen,
the window may be smaller than the viewport for a moment, which caused the arguments to be invalid.
The fix consists of matching the size of the viewport to the size of the window when it is smaller.
Also added a test to show that it does not panic.
Copy link
Contributor

github-actions bot commented Apr 3, 2024

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Windowing Platform-agnostic interface layer to run your app in labels Apr 3, 2024
@matiqo15 matiqo15 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Apr 5, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 6, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 6, 2024
Merged via the queue into bevyengine:main with commit ac91b19 Apr 6, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When VIEWPORT is set to CAMERA and switched to SizedFullscreen, PANIC may occur.
3 participants