Mercurial > fife-parpg
comparison engine/core/video/devicecaps.h @ 636:f7863bfa92cd
* Changed the way screen resolutions are detected
* Added the ability to query the video driver name
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Wed, 06 Oct 2010 20:54:28 +0000 |
parents | 3094988564d5 |
children | 3822b30fd98c |
comparison
equal
deleted
inserted
replaced
635:3094988564d5 | 636:f7863bfa92cd |
---|---|
38 namespace FIFE { | 38 namespace FIFE { |
39 | 39 |
40 | 40 |
41 class ScreenMode { | 41 class ScreenMode { |
42 public: | 42 public: |
43 /** Constructors. | 43 /** Default Constructor |
44 * @note You shouldn't construct these objects yourself. This default | |
45 * constructor was provided because swig complained that was none. | |
44 */ | 46 */ |
45 ScreenMode(); | 47 ScreenMode(); |
46 ScreenMode(uint16_t width, uint16_t height, uint16_t bpp, uint32_t SDLFlags); | 48 ScreenMode(uint16_t width, uint16_t height, uint16_t bpp, uint32_t SDLFlags); |
47 ScreenMode(const ScreenMode& rhs); | 49 ScreenMode(const ScreenMode& rhs); |
48 | 50 |
49 /** Destructor. | 51 /** Destructor. |
50 */ | 52 */ |
51 ~ScreenMode() {}; | 53 ~ScreenMode() {}; |
52 | 54 |
53 /** Returns the width of the screen mode. | 55 /** Returns the width of the screen mode. |
56 * @note If both width and height are 0 it means that ALL modes are available | |
57 * for use with the specified flags. Most likely this is a windowed mode. | |
54 */ | 58 */ |
55 uint16_t getWidth() const { return m_width; }; | 59 uint16_t getWidth() const { return m_width; }; |
56 | 60 |
57 /** Returns the height of the screen mode. | 61 /** Returns the height of the screen mode. |
62 * @note If both width and height are 0 it means that ALL modes are available | |
63 * for use with the specified flags. Most likely this is a windowed mode. | |
58 */ | 64 */ |
59 uint16_t getHeight() const { return m_height; }; | 65 uint16_t getHeight() const { return m_height; }; |
60 | 66 |
61 /** Returns the number of bits per pixel this mode supports. | 67 /** Returns the number of bits per pixel this mode uses. |
62 */ | 68 */ |
63 uint16_t getBPP() const { return m_bpp; }; | 69 uint16_t getBPP() const { return m_bpp; }; |
64 | 70 |
65 /** Returns the SDL flags used when testing this mode. | 71 /** Returns the SDL flags used when testing this mode. |
66 */ | 72 */ |
67 uint32_t getSDLFlags() const { return m_SDLFlags; }; | 73 uint32_t getSDLFlags() const { return m_SDLFlags; }; |
68 | 74 |
69 /** True if this is a fullscreen mode. Fals if it is a windowed mode. | 75 /** True if this is a fullscreen mode. False if it is a windowed mode. |
70 */ | 76 */ |
71 bool isFullScreen() const { return (m_SDLFlags & SDL_FULLSCREEN) ? true : false;}; | 77 bool isFullScreen() const { return (m_SDLFlags & SDL_FULLSCREEN) ? true : false;}; |
72 | 78 |
73 /** True if this mode uses the OpenGL renderer. False otherwise. | 79 /** True if this mode uses the OpenGL renderer. False otherwise. |
74 */ | 80 */ |
91 /** Destructor. | 97 /** Destructor. |
92 */ | 98 */ |
93 ~DeviceCaps(); | 99 ~DeviceCaps(); |
94 | 100 |
95 void fillDeviceCaps(); | 101 void fillDeviceCaps(); |
96 std::vector<ScreenMode> getSupportedScreenModes() const {return m_screenModes;} ; | 102 std::vector<ScreenMode> getSupportedScreenModes() const { return m_screenModes; }; |
103 std::string getDriverName() const { return m_driverName; }; | |
97 | 104 |
98 private: | 105 private: |
99 std::vector<ScreenMode> m_screenModes; | 106 std::vector<ScreenMode> m_screenModes; |
107 std::string m_driverName; | |
100 | 108 |
101 }; //DeviceCaps | 109 }; //DeviceCaps |
102 } | 110 } |
103 | 111 |
104 #endif //FIFE_DEVICECAPS_H | 112 #endif //FIFE_DEVICECAPS_H |