- for now make fullscreen mode ONLY use desktop resolution, all other tries seem buggy in SDL2

This commit is contained in:
SoftCoder
2015-10-04 20:34:54 -07:00
parent 9e6e4dd6fe
commit d80ca9e0b2
8 changed files with 117 additions and 28 deletions

View File

@@ -122,7 +122,7 @@ private:
static map<wchar_t,bool> mapAllowedKeys;
protected:
int w, h;
//int w, h;
static bool isActive;
static bool no2DMouseRendering;
static bool allowAltEnterFullscreenToggle;
@@ -149,6 +149,9 @@ public:
static void clearAllowedKeys();
static bool isAllowedKey(wchar_t key);
virtual int getScreenWidth() = 0;
virtual int getScreenHeight() = 0;
virtual bool ChangeVideoMode(bool preserveContext,int resWidth, int resHeight,
bool fullscreenWindow, int colorBits, int depthBits, int stencilBits,
bool hardware_acceleration, bool fullscreen_anti_aliasing,
@@ -163,8 +166,8 @@ public:
string getText();
int getX() { return 0; }
int getY() { return 0; }
int getW() { return w; }
int getH() { return h; }
int getW() { return getScreenWidth(); }
int getH() { return getScreenHeight(); }
//component state
int getClientW() { return getW(); }

View File

@@ -43,6 +43,8 @@ public:
SDL_Window * getScreenWindow();
SDL_Surface * getScreenSurface();
virtual int getScreenWidth();
virtual int getScreenHeight();
virtual bool ChangeVideoMode(bool preserveContext, int resWidth, int resHeight,
bool fullscreenWindow, int colorBits, int depthBits, int stencilBits,