Open nicolaracco opened 3 years ago
Following the suggestion of a user on discord, I tried doing the following:
unsafe {
raylib::ffi::SetConfigFlags(raylib::consts::ConfigFlag::FLAG_WINDOW_HIGHDPI as u32);
}
let (mut rl, thread) = raylib::init()
.size(1280, 720)
.title("Hello, World")
.build();
which did the trick. So it definitely should be set before creating the window :)
Unfortunately, it's not working anymore.
58 | raylib::ffi::SetConfigFlags(raylib::consts::ConfigFlag::FLAG_WINDOW_HIGHDPI as u32);
| ^^^^^^^^^^ could not find `ConfigFlag` in `consts`
Update
It's actually ConfigFlags
.
I cannot make raylib-rs play with an HiDPI screen. Running this simple code:
produces a very small window on the screen. I asked for help in the #raylib channel in discord, and they said the
SetConfigFlag(FLAG_WINDOW_HIGHDPI);
should be executed before creating a window, not after.So, if what they said is true, it seems this setting should be part of the RaylibBuilder. I tried to clone the repo and tinker with it with the purpose of testing this information and submitting a PR but for some reason (surely my poor experience with rust) I cannot even run the tests without receiving compilation errors.