introduce active and passive events
This commit is contained in:
@@ -17,7 +17,11 @@ Terminal::Terminal(Archimedes::App* a, void* h) : Archimedes::Module(a, h) {
|
||||
}
|
||||
|
||||
Terminal::~Terminal() {
|
||||
if(app) {}
|
||||
if(app) {
|
||||
ImguiModule* im; { im = (ImguiModule*) moduleInstances[ImguiModule()]; }
|
||||
|
||||
im->releaseContext(ImGui::GetCurrentContext());
|
||||
}
|
||||
}
|
||||
|
||||
void Terminal::onLoad() {
|
||||
@@ -29,7 +33,7 @@ void Terminal::onLoad() {
|
||||
std::abort();
|
||||
}
|
||||
|
||||
ImGui::SetCurrentContext(im->getContext());
|
||||
ImGui::SetCurrentContext(im->aquireContext());
|
||||
|
||||
child_pid = forkpty(&master, nullptr, nullptr, nullptr);
|
||||
|
||||
@@ -67,7 +71,7 @@ void Terminal::run() {
|
||||
rc = read(master, opArr, 150);
|
||||
if(rc < 0) {
|
||||
//error on read
|
||||
app->stopModule(name);
|
||||
app->emitEvent(new Archimedes::DoUnloadModuleEvent(name));
|
||||
} else {
|
||||
if(input == "clear") output = "";
|
||||
output += opArr;
|
||||
|
||||
Reference in New Issue
Block a user