Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL: Improve multi-monitor support by replacing display 0 with window display #2989

Merged
merged 1 commit into from May 1, 2021

Conversation

@SupSuper
Copy link
Contributor

@SupSuper SupSuper commented Apr 29, 2021

Currently most SDL2 calls are hardcoded to displayIndex 0 (the primary monitor), so if the ScummVM window is moved to a separate monitor, the results will be incorrect. This attempts to fix this by passing the window display index whenever possible.

This solves the most common bug of resizing / fullscreening on a separate monitor using the wrong resolution, though more work is still necessary to fully support multiple monitors (such as refreshing cached display values when the window is moved).

@SupSuper SupSuper force-pushed the SupSuper:window-display branch from f5233f1 to f69c548 Apr 29, 2021
@bluegr
Copy link
Member

@bluegr bluegr commented Apr 30, 2021

Great work overall! Clean and straightforward implementation. Once the SDL2-specific code is handled correctly for SDL1, this is good to be merged

@bluegr
Copy link
Member

@bluegr bluegr commented May 1, 2021

Thanks for your work! I've tried this and it improves behavior with multiple monitors

@bluegr bluegr merged commit 60f1fd9 into scummvm:master May 1, 2021
3 checks passed
3 checks passed
@codacy-production
Codacy Static Code Analysis Codacy Static Code Analysis
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@deepcode-ci-bot
deepcode-ci-bot Well done, no issues found!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants