Changed love.window.setMode to recreate the window as well as the context if a particular context profile can't be created, to work around some limitations of the OpenGL context and window code in some SDL backends.

The window/context creation code might still need some work..

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2015-01-30 17:19:47 -04:00
parent 84a6dd3b1c
commit d0e34e86f1
2 changed files with 310 additions and 282 deletions
+3 -2
View File
@@ -114,14 +114,14 @@ private:
void setGLFramebufferAttributes(int msaa, bool sRGB);
void setGLContextAttributes(const ContextAttribs &attribs);
bool checkGLVersion(const ContextAttribs &attribs);
bool setContext(int msaa, bool vsync, bool sRGB);
bool createWindowAndContext(int x, int y, int w, int h, Uint32 windowflags, int msaa, bool sRGB);
// Update the saved window settings based on the window's actual state.
void updateSettings(const WindowSettings &newsettings);
SDL_MessageBoxFlags convertMessageBoxType(MessageBoxType type) const;
std::string windowTitle;
std::string title;
struct _currentMode
{
@@ -139,6 +139,7 @@ private:
SDL_Window *window;
SDL_GLContext context;
bool displayedWindowError;
bool displayedContextError;
}; // Window