2015-05-16 10:01:38 +08:00
|
|
|
#ifndef VIDEOMODE_H
|
|
|
|
#define VIDEOMODE_H
|
|
|
|
|
|
|
|
/// Describes a video mode supported by a device
|
|
|
|
struct VideoMode
|
|
|
|
{
|
2015-06-01 22:37:31 +08:00
|
|
|
unsigned short width, height; ///< Displayed video resolution (NOT frame resolution)
|
|
|
|
unsigned short FPS; ///< Max frames per second supported by the device at this resolution
|
2015-05-16 10:01:38 +08:00
|
|
|
|
|
|
|
/// All zeros means a default/unspecified mode
|
2015-06-05 09:07:42 +08:00
|
|
|
operator bool() const
|
2015-05-16 10:01:38 +08:00
|
|
|
{
|
|
|
|
return width || height || FPS;
|
|
|
|
}
|
|
|
|
|
2015-06-05 09:07:42 +08:00
|
|
|
bool operator==(const VideoMode& other) const
|
2015-05-16 10:01:38 +08:00
|
|
|
{
|
|
|
|
return width == other.width
|
|
|
|
&& height == other.height
|
|
|
|
&& FPS == other.FPS;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VIDEOMODE_H
|
|
|
|
|