[X11] Implemented automatic fps detection#18558
Conversation
|
You can test this PR using the following package version. |
5737b95 to
66289d9
Compare
|
You can test this PR using the following package version. |
|
Tested: it works as expected. |
|
Further testing:
|
| } | ||
|
|
||
| internal int MaxRefreshRate => _impl is IX11RawScreenInfoProviderWithRefreshRate refreshProvider | ||
| ? Math.Max(60, refreshProvider.MaxRefreshRate) |
There was a problem hiding this comment.
We have 60 hardcoded in 6 different places over X11Screens.cs, X11Screen.Providers.cs and X11Platform. Please introduce a constant and use it everywhere.
| /// <summary> | ||
| /// Query for display refresh rates from RANDR. May or may not use the refresh rate of your best display. | ||
| /// </summary> | ||
| public bool AllowHighRefreshRate { get; set; } |
There was a problem hiding this comment.
Consider setting that property to true by default. On platforms such as Windows, we do use high refresh rates by default (in WinUIComposition mode) without asking the user.
That's VSync backpressure, the PR doesn't attempt to detect window/monitor matching |
|
You can test this PR using the following package version. |
|
You can test this PR using the following package version. |


Get monitor refresh rates from randr and update the timer accordingly.