# HG changeset patch # User prock@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1287070329 0 # Node ID 51bbda7676f0e1453f412a3dc17b0efd47227199 # Parent b9c132cb6ea4cb37b8e7ec2397f1a359dd1f03bb * Fixed some more integer definitions * All vars containing bits per pixel should now be uint16_t diff -r b9c132cb6ea4 -r 51bbda7676f0 engine/core/controller/engine.cpp --- a/engine/core/controller/engine.cpp Thu Oct 14 15:06:26 2010 +0000 +++ b/engine/core/controller/engine.cpp Thu Oct 14 15:32:09 2010 +0000 @@ -205,7 +205,7 @@ FL_LOG(_log, "Querying device capabilities"); m_devcaps.fillDeviceCaps(); - uint32_t bpp = m_settings.getBitsPerPixel(); + uint16_t bpp = m_settings.getBitsPerPixel(); m_screenMode = m_devcaps.getNearestScreenMode( m_settings.getScreenWidth(), diff -r b9c132cb6ea4 -r 51bbda7676f0 engine/core/controller/engine.i --- a/engine/core/controller/engine.i Thu Oct 14 15:06:26 2010 +0000 +++ b/engine/core/controller/engine.i Thu Oct 14 15:32:09 2010 +0000 @@ -47,8 +47,8 @@ ~EngineSettings(); void validate() const; void setBitsPerPixel(uint8_t bitsperpixel); - uint8_t getBitsPerPixel() const; - std::vector getPossibleBitsPerPixel() const; + uint16_t getBitsPerPixel() const; + std::vector getPossibleBitsPerPixel() const; std::vector > getPossibleResolutions() const; void setFullScreen(bool fullscreen); bool isFullScreen() const; diff -r b9c132cb6ea4 -r 51bbda7676f0 engine/core/controller/enginesettings.cpp --- a/engine/core/controller/enginesettings.cpp Thu Oct 14 15:06:26 2010 +0000 +++ b/engine/core/controller/enginesettings.cpp Thu Oct 14 15:32:09 2010 +0000 @@ -92,9 +92,9 @@ return result; } - void EngineSettings::setBitsPerPixel(uint8_t bitsperpixel) { - std::vector pv = getPossibleBitsPerPixel(); - std::vector::iterator i = std::find(pv.begin(), pv.end(), bitsperpixel); + void EngineSettings::setBitsPerPixel(uint16_t bitsperpixel) { + std::vector pv = getPossibleBitsPerPixel(); + std::vector::iterator i = std::find(pv.begin(), pv.end(), bitsperpixel); if (i != pv.end()) { m_bitsperpixel = bitsperpixel; return; @@ -102,8 +102,8 @@ throw NotSupported("Given bits per pixel value is not supported"); } - std::vector EngineSettings::getPossibleBitsPerPixel() const { - std::vector tmp; + std::vector EngineSettings::getPossibleBitsPerPixel() const { + std::vector tmp; tmp.push_back(0); tmp.push_back(16); tmp.push_back(24); diff -r b9c132cb6ea4 -r 51bbda7676f0 engine/core/controller/enginesettings.h --- a/engine/core/controller/enginesettings.h Thu Oct 14 15:06:26 2010 +0000 +++ b/engine/core/controller/enginesettings.h Thu Oct 14 15:32:09 2010 +0000 @@ -56,17 +56,17 @@ /** Sets bits per pixel * @see getPossibleBitsPerPixel */ - void setBitsPerPixel(uint8_t bitsperpixel); + void setBitsPerPixel(uint16_t bitsperpixel); /** Gets currently set bits per pixel value */ - unsigned int getBitsPerPixel() const { + uint16_t getBitsPerPixel() const { return m_bitsperpixel; } /** Gets all possible bits per pixel values */ - std::vector getPossibleBitsPerPixel() const; + std::vector getPossibleBitsPerPixel() const; /** Gets all possible screen resolutions */ @@ -130,7 +130,7 @@ /** Gets screen width (pixels) */ - unsigned int getScreenWidth() const { + uint16_t getScreenWidth() const { return m_screenwidth; } @@ -140,7 +140,7 @@ /** Gets screen height (pixels) */ - unsigned int getScreenHeight() const { + uint16_t getScreenHeight() const { return m_screenheight; }