diff --git a/src/sdlf/Window.cpp b/src/sdlf/Window.cpp index 2e28dc9..ea4abb3 100644 --- a/src/sdlf/Window.cpp +++ b/src/sdlf/Window.cpp @@ -100,17 +100,17 @@ namespace sf } IWindow::IWindow(Vector2u size, Vector2i position, std::string title, - Uint32 flags /*= SDL_WINDOW_RESIZABLE*/) : + Uint32 windowFlags /*= SDL_WINDOW_RESIZABLE*/, Uint32 renderFlags /*= SDL_RENDERER_SOFTWARE*/) : m_pWindow(nullptr), m_pRenderer(nullptr), m_oEvent(), - m_oSize(size), m_oPosition(position), m_strTitle(title), m_uFlags(flags), - m_pCurrentScreen(nullptr) + m_oSize(size), m_oPosition(position), m_strTitle(title), m_uWindowFlags(windowFlags), + m_uRenderFlags(renderFlags), m_pCurrentScreen(nullptr) { } void IWindow::MessageLoop() { - Create(m_oSize, m_oPosition, m_strTitle, m_uFlags); + Create(m_oSize, m_oPosition, m_strTitle, m_uWindowFlags, m_uRenderFlags); // Test if the user instance's creation succeeded if (!OnCreate()) diff --git a/src/sdlf/Window.hpp b/src/sdlf/Window.hpp index d403b81..727632f 100644 --- a/src/sdlf/Window.hpp +++ b/src/sdlf/Window.hpp @@ -31,7 +31,8 @@ namespace sf void SwitchScreen(IScreen* screen); protected: - IWindow(Vector2u size, Vector2i position, std::string title, Uint32 flags = SDL_WINDOW_RESIZABLE); + IWindow(Vector2u size, Vector2i position, std::string title, + Uint32 flags = SDL_WINDOW_RESIZABLE, Uint32 rendererFlags = SDL_RENDERER_SOFTWARE); virtual bool OnCreate() { return true; } virtual void OnClose() { } @@ -52,7 +53,7 @@ namespace sf Vector2u m_oSize; Vector2i m_oPosition; std::string m_strTitle; - Uint32 m_uFlags; + Uint32 m_uWindowFlags, m_uRenderFlags; IScreen* m_pCurrentScreen;