Skip to content

Windows High DPI scaling #9145

Closed Answered by s-mayrh
s-mayrh asked this question in Q&A
Discussion options

You must be logged in to vote

Solved, but for reference, if someone else is looking for a solution:
The example: https://github.com/bevyengine/bevy/blob/main/examples/window/scale_factor_override.rs
Documentation: https://docs.rs/bevy/latest/bevy/window/struct.WindowResolution.html

use bevy::window::WindowResolution;
instead of:
.add_plugins(DefaultPlugins)
use:

         .add_plugins(DefaultPlugins.set(WindowPlugin {
            primary_window: Some(Window {
                resolution: WindowResolution::new(1280., 720.).with_scale_factor_override(1.0),
                ..default()
            }),
            ..default()
        }))

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by s-mayrh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant