aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/Graphics')
-rw-r--r--src/libjin/Graphics/Window.cpp11
-rw-r--r--src/libjin/Graphics/Window.h6
2 files changed, 8 insertions, 9 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
diff --git a/src/libjin/Graphics/Window.h b/src/libjin/Graphics/Window.h
index 893fdb8..6213cee 100644
--- a/src/libjin/Graphics/Window.h
+++ b/src/libjin/Graphics/Window.h
@@ -3,9 +3,9 @@
#include "../modules.h"
#if JIN_MODULES_RENDER
-#include <SDL2/SDL.h>
+#include "SDL2/SDL.h"
#include "../utils/utils.h"
-#include "../common/subsystem.h"
+#include "../common/Subsystem.hpp"
namespace jin
{
@@ -51,8 +51,6 @@ namespace graphics
onlyonce void quitSystem() override;
};
- typedef WindowSystem::Setting WindowSetting;
-
} // render
} // jin