This commit is contained in:
2025-03-22 01:45:25 -05:00
parent 8e81cd81dc
commit 4bd2d6908e
8 changed files with 46 additions and 27 deletions

View File

@@ -44,9 +44,10 @@ namespace Archimedes {
}
Module::create_t* create = (Module::create_t*) dlsym(h, "create");
if(dlerror()) {
char* err = dlerror();
if(err) {
std::cout << "error finding create function in file: " << lib << std::endl;
std::cout << "dlerror(): " << err << std::endl;
}
Module* m = create(h, App::Get());

View File

@@ -12,13 +12,14 @@ namespace Archimedes {
typedef GuiModule* create_t(void*, App&);
GuiModule(void* h, App& a) : Module(h, a) {}
virtual ~GuiModule() {}
virtual ~GuiModule() { if(window) delete window; }
virtual void onLoad() = 0;
virtual void run() = 0;
Window* getWindow() { return window; }
void createWindow() { window = new Window(); }
private:
protected:
Window* window;
};
}