aboutsummaryrefslogtreecommitdiff
path: root/libjin/Graphics
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-07-28 13:33:11 +0800
committerchai <chaifix@163.com>2018-07-28 13:33:11 +0800
commit97c96e1d127a7a0c21d6bcf8af97b90649971d1f (patch)
tree4f227b09a47420ffc6ae89532cd49a90a416e327 /libjin/Graphics
parentce63f79c7d683d0de398f6ea0483cdd59ec06a62 (diff)
*update
Diffstat (limited to 'libjin/Graphics')
-rw-r--r--libjin/Graphics/Window.cpp11
-rw-r--r--libjin/Graphics/Window.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/libjin/Graphics/Window.cpp b/libjin/Graphics/Window.cpp
index 2d0fa82..28e5b84 100644
--- a/libjin/Graphics/Window.cpp
+++ b/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
diff --git a/libjin/Graphics/Window.h b/libjin/Graphics/Window.h
index 55492f6..6213cee 100644
--- a/libjin/Graphics/Window.h
+++ b/libjin/Graphics/Window.h
@@ -51,8 +51,6 @@ namespace graphics
onlyonce void quitSystem() override;
};
- typedef WindowSystem::Setting WindowSetting;
-
} // render
} // jin