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

[Merged by Bors] - Fix scale_factor_override in the winit backend #2784

Closed
wants to merge 4 commits into from

Conversation

DJMcNab
Copy link
Member

@DJMcNab DJMcNab commented Sep 7, 2021

Objective

Solution

  • Avoid changing the window size if there is a scale factor override
  • Can be tested with the scale_factor_override example - use to active overriding the scale factor

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Sep 7, 2021
@DJMcNab DJMcNab added A-Windowing Platform-agnostic interface layer to run your app in and removed S-Needs-Triage This issue needs to be labelled labels Sep 7, 2021
Copy link
Member

@TheRawMeatball TheRawMeatball left a comment

Choose a reason for hiding this comment

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

Other than not being quite sure on a new crate, this looks good

@@ -23,6 +23,7 @@ bevy_utils = { path = "../bevy_utils", version = "0.5.0" }

# other
winit = { version = "0.25.0", default-features = false }
approx = { version = "0.5.0", default-features = false }
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a new crate? Wouldn't silencing clippy, or using epsilon work?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe? We already depend on this transitively in the bevy_text crate, and I don't think it's that big. I can make the function inline though.

Copy link
Member

Choose a reason for hiding this comment

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

ah, if the dep already exists it's probably fine

Copy link
Member

Choose a reason for hiding this comment

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

This feels small enough that it might be better to include it in bevy_core. We already have FloatOrd, which is in a similar vein. For now this is fine though.

@mockersf mockersf 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 Sep 9, 2021
@cart
Copy link
Member

cart commented Sep 10, 2021

bors r+

bors bot pushed a commit that referenced this pull request Sep 10, 2021
# Objective

- Fixes #2751

## Solution

- Avoid changing the window size if there is a scale factor override
- Can be tested with the `scale_factor_override` example - use <kbd>⏎</kbd> to active overriding the scale factor
@bors bors bot changed the title Fix scale_factor_override in the winit backend [Merged by Bors] - Fix scale_factor_override in the winit backend Sep 10, 2021
@bors bors bot closed this Sep 10, 2021
@DJMcNab DJMcNab deleted the window-scale branch September 10, 2021 19:14
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 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.

Scale factor override crossing screens with different native scale factors causes odd behaviour
4 participants