Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: libsdl-org/SDL
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: amshafer/SDL
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jul 8, 2021

  1. SetDisplayMode: Call XRRSetScreenSize before setting CRTC config

    X11_SetDisplayMode currently calls X11_XRRSetCrtcConfig alone. This results
    in the monitor's viewport getting changed, but the underlying screen dimensions
    stay the same.
    
    The spec indicates that RRSetCrtcConfig only changes the crtc mode and has no effect
    on the screen dimensions, only mentioning that the new crtc must fit entirely within the
    screen size. For the size to change, RRSetScreenSize also needs to be called.
    
    This affects Metro Exodus on Linux, when changing the resolution in the in-game settings
    Metro gets stuck in a loop waiting for the size of its vulkan surface to change. Because
    XRRSetScreenSize is not called the screen size is never changed, the vulkan surface dimensions
    do not change, and Metro hangs forever watching for a surface size update that will
    never come.
    
    This change disables the CRTC, calls XRRSetScreenSize, and then updates the
    CRTC configuration. This fixes changing the resolution from the Metro settings.
    
    Tested with:
    Metro Exodus, Portal 2
    amshafer committed Jul 8, 2021
    Configuration menu
    Copy the full SHA
    fb2b96f View commit details
    Browse the repository at this point in the history
Loading