mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-12 20:55:37 +00:00
Screen and resolution enumeration should now work.
This commit is contained in:
parent
5232e0a3b2
commit
a1da9ff305
|
@ -27,29 +27,24 @@ namespace OpenTK.Platform.X11
|
|||
{
|
||||
for (int i = 0; i < API.ScreenCount; i++)
|
||||
{
|
||||
List<DisplayResolution> resolutions = new List<DisplayResolution>();
|
||||
unsafe
|
||||
{
|
||||
Debug.Print("Checkpoint 1");
|
||||
XRRScreenSize[] array = Functions.XRRSizes(API.DefaultDisplay, i);
|
||||
Debug.Print("{0} resolutions.", array.Length);
|
||||
Debug.Indent();
|
||||
int count = array.Length;
|
||||
while (count-- != 0)
|
||||
Debug.Print(array[count].ToString());
|
||||
for (int count = 0; count < array.Length; count++)
|
||||
{
|
||||
resolutions.Add(new DisplayResolution(array[i].Width, array[i].Height, 0, 0));
|
||||
Debug.Print(resolutions[count].ToString());
|
||||
}
|
||||
Debug.Unindent();
|
||||
}
|
||||
}
|
||||
//Functions.XRRSizes(API.DefaultDisplay, API.DefaultScreen,
|
||||
//Functions.XRRGetScreenInfo(API.DefaultDisplay);
|
||||
|
||||
}
|
||||
|
||||
// Construct a default device for testing purposes.
|
||||
new DisplayDevice(new DisplayResolution(800, 600, 24, 0), true,
|
||||
new DisplayResolution[]
|
||||
{
|
||||
new DisplayResolution(800, 600, 24, 0)
|
||||
});
|
||||
// Construct a default device for testing purposes.
|
||||
new DisplayDevice(resolutions[0], i == API.DefaultScreen, resolutions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public X11XrandrDisplayDevice()
|
||||
|
|
Loading…
Reference in a new issue