Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/ps/VideoMode.h
Show All 27 Lines | public: | ||||
/** | /** | ||||
* Initialise the video mode, for use in an SDL-using application. | * Initialise the video mode, for use in an SDL-using application. | ||||
*/ | */ | ||||
bool InitSDL(); | bool InitSDL(); | ||||
/** | /** | ||||
* Initialise parts of the video mode, for use in Atlas (which uses | * Initialise parts of the video mode, for use in Atlas (which uses | ||||
* wxWidgets instead of SDL for GL). | * wxWidgets instead of SDL for GL). | ||||
* Currently this just tries to enable S3TC. | |||||
*/ | */ | ||||
bool InitNonSDL(); | bool InitNonSDL(); | ||||
/** | /** | ||||
* Shut down after InitSDL/InitNonSDL, so that they can be used again. | * Shut down after InitSDL/InitNonSDL, so that they can be used again. | ||||
*/ | */ | ||||
void Shutdown(); | void Shutdown(); | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public: | ||||
SDL_Window* GetWindow(); | SDL_Window* GetWindow(); | ||||
void SetWindowIcon(); | void SetWindowIcon(); | ||||
private: | private: | ||||
void ReadConfig(); | void ReadConfig(); | ||||
int GetBestBPP(); | int GetBestBPP(); | ||||
bool SetVideoMode(int w, int h, int bpp, bool fullscreen); | bool SetVideoMode(int w, int h, int bpp, bool fullscreen); | ||||
void EnableS3TC(); | |||||
/** | /** | ||||
* Remember whether Init has been called. (This isn't used for anything | * Remember whether Init has been called. (This isn't used for anything | ||||
* important, just for verifying that the callers call our methods in | * important, just for verifying that the callers call our methods in | ||||
* the right order.) | * the right order.) | ||||
*/ | */ | ||||
bool m_IsInitialised; | bool m_IsInitialised; | ||||
SDL_Window* m_Window; | SDL_Window* m_Window; | ||||
// Initial desktop settings | // Initial desktop settings | ||||
int m_PreferredW; | int m_PreferredW; | ||||
int m_PreferredH; | int m_PreferredH; | ||||
int m_PreferredBPP; | int m_PreferredBPP; | ||||
int m_PreferredFreq; | int m_PreferredFreq; | ||||
// Config file settings (0 if unspecified) | // Config file settings (0 if unspecified) | ||||
int m_ConfigW; | int m_ConfigW; | ||||
int m_ConfigH; | int m_ConfigH; | ||||
int m_ConfigBPP; | int m_ConfigBPP; | ||||
int m_ConfigDisplay; | int m_ConfigDisplay; | ||||
bool m_ConfigFullscreen; | bool m_ConfigFullscreen; | ||||
bool m_ConfigForceS3TCEnable; | |||||
// If we're fullscreen, size/position of window when we were last windowed (or the default window | // If we're fullscreen, size/position of window when we were last windowed (or the default window | ||||
// size/position if we started fullscreen), to support switching back to the old window size/position | // size/position if we started fullscreen), to support switching back to the old window size/position | ||||
int m_WindowedW; | int m_WindowedW; | ||||
int m_WindowedH; | int m_WindowedH; | ||||
int m_WindowedX; | int m_WindowedX; | ||||
int m_WindowedY; | int m_WindowedY; | ||||
Show All 12 Lines |
Wildfire Games · Phabricator