emoon / rust_minifb

Cross platfrom window and framebuffer crate for Rust
MIT License
1k stars 95 forks source link

macOS: mfb_get_position uses the MainScreen size for calculations #287

Closed AndreasOM closed 2 years ago

AndreasOM commented 2 years ago

If the window is on a secondary screen with different dimensions mfb_get_position and thus get_position will return wrong coordinates.

Not sure what the best approach would be to get the screen the window is actually on.

And yes, I broke it. I just don't have a system with two screens.

emoon commented 2 years ago

I see. I assume there is some API call to get the active screen and then it should be possible to fix it.

I don't have have a dual screen system either for macOS. I think it's possible to use an iPad as secondary screen tho, so maybe that is one way to test it.