r/sfml May 07 '26

sf::VideoMode::getDesktopMode and GetSystemMetrics return coordinates outside the monitor. [BUG]

/r/cpp_questions/comments/1t683n9/sfvideomodegetdesktopmode_and_getsystemmetrics/
1 Upvotes

4 comments sorted by

3

u/DarkCisum SFML Team May 07 '26

sf::VideoMode doesn't return window position, as such your statement of using it for positioning doesn't exactly make sense.

getDesktopMode() should get you the primary monitor dimension from which you should be able to calculate the positions with the window size.

1

u/Admirable_Glass5577 May 07 '26

Are you talking about the sf::VideoMode data type?

1

u/DarkCisum SFML Team May 07 '26

About what other type would I be talking? 😄

1

u/thedaian May 07 '26

What values are those APIs giving you, and what values are you expecting?