mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-12 11:05:29 +00:00
Merged improved XRandR handling from 0.9.8 branch.
This commit is contained in:
parent
58e58e8885
commit
d2ed387c67
|
@ -55,6 +55,11 @@ namespace OpenTK.Platform.X11
|
||||||
int resolution_count = 0;
|
int resolution_count = 0;
|
||||||
foreach (XRRScreenSize size in FindAvailableResolutions(screen))
|
foreach (XRRScreenSize size in FindAvailableResolutions(screen))
|
||||||
{
|
{
|
||||||
|
if (size.Width == 0 || size.Height == 0)
|
||||||
|
{
|
||||||
|
Debug.Print("[Warning] XRandR returned an invalid resolution ({0}) for display device {1}", size, screen);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
short[] rates = Functions.XRRRates(API.DefaultDisplay, screen, resolution_count);
|
short[] rates = Functions.XRRRates(API.DefaultDisplay, screen, resolution_count);
|
||||||
|
|
||||||
// It seems that XRRRates returns 0 for modes that are larger than the screen
|
// It seems that XRRRates returns 0 for modes that are larger than the screen
|
||||||
|
|
Loading…
Reference in a new issue