1
Window / Desktop/Fullscreen resolution with multiple monitors
« on: July 02, 2020, 06:27:05 pm »
I tried to use sf::VideoMode::getDesktopMode() to initialize a window with my desktop size, I then get a window size of 4480x1440.
I have one monitor with a resolution of 2560x1440 and another with 1920x1080 so the window covers both monitors.
I modified the example of the window example in the SFML project to output the desktop and fullscreen modes:
The determined desktop resolution covers both monitors and the resolution list looks like a mix between the modes of the two monitors.
xrandr gives me the following lists:
I created a branch and modified VideoModeImpl.cpp and after that I get the following:
See my changes:
https://github.com/SFML/SFML/compare/master...hachmeister:multi-monitor-resolution
Are there some issues with the current implementation or am I missing something here when using SFML?
My system: Debian testing, KDE 5 desktop with NVIDIA GeForce GTX 1060
I have one monitor with a resolution of 2560x1440 and another with 1920x1080 so the window covers both monitors.
I modified the example of the window example in the SFML project to output the desktop and fullscreen modes:
Fullscreen modes:
- 4480x1440x32
- 1920x1080x32
- 1680x1050x32
- 1600x900x32
- 1440x900x32
- 1366x768x32
- 1280x1024x32
- 1280x800x32
- 1280x720x32
- 1024x768x32
- 800x600x32
- 720x576x32
- 720x480x32
- 640x480x32
...
Desktop mode: 4480x1440x24
- 4480x1440x32
- 1920x1080x32
- 1680x1050x32
- 1600x900x32
- 1440x900x32
- 1366x768x32
- 1280x1024x32
- 1280x800x32
- 1280x720x32
- 1024x768x32
- 800x600x32
- 720x576x32
- 720x480x32
- 640x480x32
...
Desktop mode: 4480x1440x24
The determined desktop resolution covers both monitors and the resolution list looks like a mix between the modes of the two monitors.
xrandr gives me the following lists:
Monitor 2560x1440
-----------------
2560x1440
1920x1080
1680x1050
1440x900
1440x576
1440x480
1280x1024
1280x960
1280x800
1280x720
1152x864
1024x768
800x600
720x576
720x480
640x480
Monitor 1920x1080
-----------------
1920x1080
1680x1050
1600x900
1280x1024
1280x800
1280x720
1024x768
800x600
720x576
720x480
640x480
-----------------
2560x1440
1920x1080
1680x1050
1440x900
1440x576
1440x480
1280x1024
1280x960
1280x800
1280x720
1152x864
1024x768
800x600
720x576
720x480
640x480
Monitor 1920x1080
-----------------
1920x1080
1680x1050
1600x900
1280x1024
1280x800
1280x720
1024x768
800x600
720x576
720x480
640x480
I created a branch and modified VideoModeImpl.cpp and after that I get the following:
Fullscreen modes:
- 2560x1440x32
- 1920x1080x32
- 1680x1050x32
- 1440x900x32
- 1440x576x32
- 1440x480x32
- 1280x1024x32
- 1280x960x32
- 1280x800x32
- 1280x720x32
- 1152x864x32
- 1024x768x32
- 800x600x32
- 720x576x32
- 720x480x32
- 640x480x32
...
Desktop mode: 2560x1440x24
- 2560x1440x32
- 1920x1080x32
- 1680x1050x32
- 1440x900x32
- 1440x576x32
- 1440x480x32
- 1280x1024x32
- 1280x960x32
- 1280x800x32
- 1280x720x32
- 1152x864x32
- 1024x768x32
- 800x600x32
- 720x576x32
- 720x480x32
- 640x480x32
...
Desktop mode: 2560x1440x24
See my changes:
https://github.com/SFML/SFML/compare/master...hachmeister:multi-monitor-resolution
Are there some issues with the current implementation or am I missing something here when using SFML?
My system: Debian testing, KDE 5 desktop with NVIDIA GeForce GTX 1060