mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 16:55:28 +00:00
Renamed Display to DisplayDevice.
This commit is contained in:
parent
de2cc325a4
commit
42acaf3165
|
@ -45,7 +45,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Constructs a new DisplayMode with sensible default parameters.</summary>
|
||||
public DisplayMode()
|
||||
: this(Display.PrimaryDisplay.BitsPerPixel, 16, 0, 0, 2, false)
|
||||
: this(DisplayDevice.PrimaryDisplay.BitsPerPixel, 16, 0, 0, 2, false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ namespace OpenTK
|
|||
/// <param name="height">The Height of the DisplayMode in pixels.</param>
|
||||
[Obsolete]
|
||||
public DisplayMode(int width, int height)
|
||||
: this(width, height, Display.PrimaryDisplay.BitsPerPixel, 16, 0, 0, 0, false, false, false, 0.0f)
|
||||
: this(width, height, DisplayDevice.PrimaryDisplay.BitsPerPixel, 16, 0, 0, 0, false, false, false, 0.0f)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenTK.Graphics
|
|||
/// Defines a display device on the underlying system, and provides
|
||||
/// methods to query and change its display parameters.
|
||||
/// </summary>
|
||||
public class Display
|
||||
public class DisplayDevice
|
||||
{
|
||||
// TODO: Add support for refresh rate queries and switches.
|
||||
// TODO: Check whether bits_per_pixel works correctly under Mono/X11.
|
||||
|
@ -29,20 +29,20 @@ namespace OpenTK.Graphics
|
|||
float refresh_rate;
|
||||
bool primary;
|
||||
|
||||
static List<Display> available_displays = new List<Display>();
|
||||
static List<DisplayDevice> available_displays = new List<DisplayDevice>();
|
||||
static object display_lock = new object();
|
||||
static Display primary_display;
|
||||
static DisplayDevice primary_display;
|
||||
|
||||
#region --- Constructors ---
|
||||
|
||||
static Display()
|
||||
static DisplayDevice()
|
||||
{
|
||||
lock (display_lock)
|
||||
{
|
||||
int i = 0;
|
||||
foreach (System.Windows.Forms.Screen scr in System.Windows.Forms.Screen.AllScreens)
|
||||
{
|
||||
available_displays.Add(new Display(scr.Bounds.Width, scr.Bounds.Height, 32, 0, scr.Primary));
|
||||
available_displays.Add(new DisplayDevice(scr.Bounds.Width, scr.Bounds.Height, 32, 0, scr.Primary));
|
||||
if (scr.Primary)
|
||||
primary_display = available_displays[i];
|
||||
++i;
|
||||
|
@ -50,7 +50,7 @@ namespace OpenTK.Graphics
|
|||
}
|
||||
}
|
||||
|
||||
Display(int width, int height, int bitsPerPixel, float refreshRate, bool primary)
|
||||
DisplayDevice(int width, int height, int bitsPerPixel, float refreshRate, bool primary)
|
||||
{
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
|
@ -78,7 +78,7 @@ namespace OpenTK.Graphics
|
|||
/// <summary>
|
||||
/// Gets an array of OpenTK.Display objects, which describe all available display devices.
|
||||
/// </summary>
|
||||
public static Display[] AvailableDisplays
|
||||
public static DisplayDevice[] AvailableDisplays
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ namespace OpenTK.Graphics
|
|||
}
|
||||
|
||||
/// <summary>Gets the primary display of this system.</summary>
|
||||
public static Display PrimaryDisplay { get { return primary_display; } }
|
||||
public static DisplayDevice PrimaryDisplay { get { return primary_display; } }
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
Loading…
Reference in a new issue