mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-06 15:50:44 +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++)
|
for (int i = 0; i < API.ScreenCount; i++)
|
||||||
{
|
{
|
||||||
|
List<DisplayResolution> resolutions = new List<DisplayResolution>();
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
Debug.Print("Checkpoint 1");
|
|
||||||
XRRScreenSize[] array = Functions.XRRSizes(API.DefaultDisplay, i);
|
XRRScreenSize[] array = Functions.XRRSizes(API.DefaultDisplay, i);
|
||||||
Debug.Print("{0} resolutions.", array.Length);
|
Debug.Print("{0} resolutions.", array.Length);
|
||||||
Debug.Indent();
|
Debug.Indent();
|
||||||
int count = array.Length;
|
for (int count = 0; count < array.Length; count++)
|
||||||
while (count-- != 0)
|
{
|
||||||
Debug.Print(array[count].ToString());
|
resolutions.Add(new DisplayResolution(array[i].Width, array[i].Height, 0, 0));
|
||||||
|
Debug.Print(resolutions[count].ToString());
|
||||||
|
}
|
||||||
Debug.Unindent();
|
Debug.Unindent();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//Functions.XRRSizes(API.DefaultDisplay, API.DefaultScreen,
|
|
||||||
//Functions.XRRGetScreenInfo(API.DefaultDisplay);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Construct a default device for testing purposes.
|
// Construct a default device for testing purposes.
|
||||||
new DisplayDevice(new DisplayResolution(800, 600, 24, 0), true,
|
new DisplayDevice(resolutions[0], i == API.DefaultScreen, resolutions);
|
||||||
new DisplayResolution[]
|
}
|
||||||
{
|
}
|
||||||
new DisplayResolution(800, 600, 24, 0)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public X11XrandrDisplayDevice()
|
public X11XrandrDisplayDevice()
|
||||||
|
|
Loading…
Reference in a new issue