Added debug code to dump the number of screens.

This commit is contained in:
the_fiddler 2008-01-25 13:13:05 +00:00
parent ddd812cff4
commit 1578d18666

View file

@ -11,15 +11,38 @@ using System.Collections.Generic;
using System.Text;
using OpenTK.Graphics;
using System.Diagnostics;
namespace OpenTK.Platform.X11
{
internal class X11XrandrDisplayDevice : IDisplayDeviceDriver
{
static object display_lock = new object();
#region --- Constructors ---
static X11XrandrDisplayDevice()
{
lock (display_lock)
{
for (int i = 0; i < API.ScreenCount; i++)
{
unsafe
{
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());
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[]