From 1578d186663cf29ace3f86a6ad649c2804e571ef Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 25 Jan 2008 13:13:05 +0000 Subject: [PATCH] Added debug code to dump the number of screens. --- .../Platform/X11/X11XrandrDisplayDevice.cs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Source/OpenTK/Platform/X11/X11XrandrDisplayDevice.cs b/Source/OpenTK/Platform/X11/X11XrandrDisplayDevice.cs index 3f931bfa..ec7a4f09 100644 --- a/Source/OpenTK/Platform/X11/X11XrandrDisplayDevice.cs +++ b/Source/OpenTK/Platform/X11/X11XrandrDisplayDevice.cs @@ -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[]