diff --git a/modules/Window/src/WindowModule.cpp b/modules/Window/src/WindowModule.cpp index d404752..7567916 100644 --- a/modules/Window/src/WindowModule.cpp +++ b/modules/Window/src/WindowModule.cpp @@ -1,12 +1,18 @@ #include "WindowModule.h" -WindowModule::WindowModule(void* h, App& a) : Module(h, a) { +WindowModule::WindowModule(void* h, Archimedes::App& a) : Module(h, a) { name = "Window"; } -WindowModule::~WindowModule() {} +WindowModule::~WindowModule() { + if(window) + delete window; +} -void WindowModule::onLoad() {} +void WindowModule::onLoad() { + + window = new Archimedes::Window(); +} void WindowModule::run() { diff --git a/modules/Window/src/WindowModule.h b/modules/Window/src/WindowModule.h index e36214b..8574f7e 100644 --- a/modules/Window/src/WindowModule.h +++ b/modules/Window/src/WindowModule.h @@ -15,7 +15,7 @@ class WindowModule : public Archimedes::Module { private: - Archimedes::Window window; + Archimedes::Window* window; };