Utility/VideoMode: Make bpp optionnal (defaults to desktop bpp)

This commit is contained in:
Jérôme Leclercq 2016-11-08 01:14:04 +01:00
parent 3cb6981ab7
commit 4570f9a6e1
2 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,7 @@ namespace Nz
{ {
public: public:
VideoMode(); VideoMode();
VideoMode(unsigned int w, unsigned int h);
VideoMode(unsigned int w, unsigned int h, UInt8 bpp); VideoMode(unsigned int w, unsigned int h, UInt8 bpp);
bool IsFullscreenValid() const; bool IsFullscreenValid() const;

View File

@ -24,6 +24,11 @@ namespace Nz
width(0) width(0)
{ {
} }
VideoMode::VideoMode(unsigned int w, unsigned int h) :
VideoMode(w, h, GetDesktopMode().bitsPerPixel)
{
}
VideoMode::VideoMode(unsigned int w, unsigned int h, UInt8 bpp) : VideoMode::VideoMode(unsigned int w, unsigned int h, UInt8 bpp) :
bitsPerPixel(bpp), bitsPerPixel(bpp),