diff options
author | chai <chaifix@163.com> | 2018-07-28 13:47:51 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-07-28 13:47:51 +0800 |
commit | d033400614e7e2c0ff49e5100c81e937e5818e74 (patch) | |
tree | 82e011222e9d88b3f7dff239aefae4a2c100fef4 /src/libjin/Graphics/Window.cpp | |
parent | 7b7a510321112978090575e89c3dabeba9ea9f97 (diff) |
*update
Diffstat (limited to 'src/libjin/Graphics/Window.cpp')
-rw-r--r-- | src/libjin/Graphics/Window.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libjin/Graphics/Window.cpp b/src/libjin/Graphics/Window.cpp index 2d0fa82..28e5b84 100644 --- a/src/libjin/Graphics/Window.cpp +++ b/src/libjin/Graphics/Window.cpp @@ -14,14 +14,14 @@ namespace jin namespace graphics { - onlyonce bool WindowSystem::initSystem(const SettingBase* s) + bool WindowSystem::initSystem(const SettingBase* s) { Loghelper::log(Loglevel::LV_INFO, "Init window system"); if (SDL_Init(SDL_INIT_VIDEO) < 0) return false; - const WindowSetting* setting = (WindowSetting*)s; + const Setting* setting = (Setting*)s; width = setting->width; height = setting->height; @@ -73,9 +73,10 @@ namespace graphics return true; } - onlyonce void WindowSystem::quitSystem() + void WindowSystem::quitSystem() { SDL_DestroyWindow(wnd); + SDL_Quit(); } inline void WindowSystem::swapBuffers() @@ -84,7 +85,7 @@ namespace graphics SDL_GL_SwapWindow(wnd); } -} -} +} // graphics +} // jin #endif // JIN_MODULES_RENDER
\ No newline at end of file |