Adding graphics support for MacOS using XQuartz#317
Closed
natestone wants to merge 3 commits intoProjectPhysX:masterfrom
Closed
Adding graphics support for MacOS using XQuartz#317natestone wants to merge 3 commits intoProjectPhysX:masterfrom
natestone wants to merge 3 commits intoProjectPhysX:masterfrom
Conversation
XQuartz on Mac does not have a fully-compliant RandR system. This modification allows the X11 provisioning to fall back to the screen size of the display using window dimensions. This will probably increase compatibility with other systems that have incomplete X11 implementations.
Open
Owner
|
Hi @natestone, thanks a lot for testing and for this suggestion! I've added your changes in this commit. Kind regards, |
phansel
reviewed
Mar 14, 2026
| XRRFreeScreenResources(x11_screen_resources); | ||
| if(x11_screen_resources) { | ||
| RROutput primary_output = XRRGetOutputPrimary(x11_display, x11_root_window); | ||
| XRROutputInfo* x11_output_info = (primary_output != None) ? XRRGetOutputInfo(x11_display, x11_screen_resources, primary_output) : nullptr; |
There was a problem hiding this comment.
@ProjectPhysX XRRGetOutputInfo causes a hard crash on XQuartz, so it should only be conditionally called if XRRGetOutputPrimary returns a valid value (e.g. as done in line 702).
e34f29d still crashes on macOS.
Kind regards,
Paul
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a fallback mode to determine available screen/X11 options when xrandr fails to produce the desired result. Since XQuartz has an incomplete xrandr implementation, the default graphics requests fail. The fallback uses other X11 calls to determine the screen width and height to create a full screen implementation for the INTERACTIVE_GRAPHICS option.