build: fix Linux builds missing XRandR support #2419
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Description
Resolves #2382. In essence, the fix involves installing a specific library. Without this library, SDL mistakenly perceives multiple monitors as a single expansive monitor that spans the entire working area. This results in errors in fullscreen mode, particularly affecting the calculation of positions and aspect ratios.
In TR1, the problem surfaces when I switch to another workspace and then return to the one with TR. The game then occupies only half the screen. Cycling through the workspaces again resolves the issue, but repeating the process brings the issue back. I assume this behavior is present since version 3.0 that marks the dawn of the Linux builds.
In TR2, the issue shows up differently. The way the shell and viewport modules are designed leads to the half screen fullscreen problem even when I don't switch workspaces. It gets worse with FMVs, causing positioning to be twice as off in fullscreen mode and creating aspect ratio problems even in windowed mode.
The attached changes require rebuilding the toolchain but do fix all of these issues. TR2 Linux builds aren't out yet, hence no change log entry there.