start TestNotCurses

This commit is contained in:
2025-04-13 14:21:26 -05:00
parent 640c19c439
commit afed109c74
2 changed files with 14 additions and 1 deletions

View File

@@ -5,13 +5,24 @@ TestNotCurses::TestNotCurses(Archimedes::App* a, void* h) : Archimedes::Module(a
} }
TestNotCurses::~TestNotCurses() { TestNotCurses::~TestNotCurses() {
notcurses_stop(ncInstance);
} }
void TestNotCurses::onLoad() { void TestNotCurses::onLoad() {
setlocale(LC_ALL, "");
notcurses_options opts;
ncInstance = notcurses_init(&opts, NULL);
if(!ncInstance) {
app->stopModule(getName());
return;
}
} }
void TestNotCurses::run() { void TestNotCurses::run() {
notcurses_render(ncInstance);
} }

View File

@@ -9,6 +9,8 @@ class TestNotCurses : public Archimedes::Module {
~TestNotCurses(); ~TestNotCurses();
void run(); void run();
void onLoad(); void onLoad();
private:
notcurses* ncInstance;
}; };
#ifdef TESTNOTCURSES_DYNAMIC #ifdef TESTNOTCURSES_DYNAMIC