diff --git a/SakuraCore/src/Application.cpp b/SakuraCore/src/Application.cpp index ab6f35b..ececc54 100644 --- a/SakuraCore/src/Application.cpp +++ b/SakuraCore/src/Application.cpp @@ -50,7 +50,7 @@ bool Application::Init() { m_AppData.windowdata.eventCallback = [this](Event &event) { RaiseEvent(event); }; m_Window.push_back(std::make_shared(m_AppData.windowdata)); - bool isSuccessful = m_Window[0]->Create(); + bool isSuccessful = m_Window[0]->Create({m_AppData.windowdata.windowFlags}); if (!isSuccessful) { Shutdown(); return false; diff --git a/SakuraCore/src/Window.cpp b/SakuraCore/src/Window.cpp index 356dbda..1304668 100644 --- a/SakuraCore/src/Window.cpp +++ b/SakuraCore/src/Window.cpp @@ -11,10 +11,8 @@ namespace SakuraVNE { Window::Window(const WindowData &data) : m_Data(data) {} Window::~Window() { Destroy(); } -bool Window::Create(std::span flags) { - for (auto &flag : flags) { - m_Flags |= flag; - } +bool Window::Create(const SDL_WindowFlags flags) { + m_Flags |= flags; m_Handle = SDL_CreateWindow(m_Data.title.c_str(), m_Data.width, m_Data.height, m_Flags); diff --git a/SakuraCore/src/Window.h b/SakuraCore/src/Window.h index 8f84b57..72584a3 100644 --- a/SakuraCore/src/Window.h +++ b/SakuraCore/src/Window.h @@ -9,7 +9,7 @@ namespace SakuraVNE { struct WindowData { - std::span windowFlags; + SDL_WindowFlags windowFlags; std::string title = "Window Title"; int width = 1280; int height = 720; @@ -27,7 +27,7 @@ public: Window(const WindowData &data = WindowData()); ~Window(); - bool Create(std::span flags = {}); + bool Create(const SDL_WindowFlags flags = 0); void Destroy(); void Update();