// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Drawing; namespace osu.Framework.Platform { /// /// Represents a display mode on a given . /// public readonly struct DisplayMode { /// /// The pixel format of the display mode, if available. /// public readonly string Format; /// /// The dimensions of the screen resolution in pixels. /// public readonly Size Size; /// /// The number of bits that represent the colour value for each pixel. /// public readonly int BitsPerPixel; /// /// The refresh rate in hertz. /// public readonly int RefreshRate; /// /// The index of the display mode as determined by the windowing backend. /// public readonly int Index; /// /// The index of the display this mode belongs to as determined by the windowing backend. /// public readonly int DisplayIndex; public DisplayMode(string format, Size size, int bitsPerPixel, int refreshRate, int index, int displayIndex) { Format = format ?? "Unknown"; Size = size; BitsPerPixel = bitsPerPixel; RefreshRate = refreshRate; Index = index; DisplayIndex = displayIndex; } public override string ToString() => $"Size: {Size}, BitsPerPixel: {BitsPerPixel}, RefreshRate: {RefreshRate}, Format: {Format}, Index: {Index}, DisplayIndex: {DisplayIndex}"; } }