Updated efsw.

Updated github actions build files.
eterm: Windows fixes. Some refactor.
This commit is contained in:
Martín Lucas Golini
2022-06-25 03:26:16 -03:00
parent 0074e73e3e
commit b0280b6acd
19 changed files with 156 additions and 58 deletions
+5 -11
View File
@@ -59,9 +59,11 @@ void inputCallback( InputEvent* event ) {
void mainLoop() {
win->getInput()->update();
terminal->update();
if ( terminal->isDirty() ) {
if ( terminal )
terminal->update();
if ( terminal && terminal->isDirty() ) {
win->clear();
terminal->draw();
win->display();
@@ -93,16 +95,8 @@ EE_MAIN_FUNC int main( int, char*[] ) {
fontMono->loadFromFile( "assets/fonts/DejaVuSansMono.ttf" );
if ( !terminal || terminal->hasTerminated() ) {
std::string shell;
const char* shellenv = getenv( "SHELL" );
if ( shellenv != nullptr ) {
shell = shellenv;
} else {
shell = "/bin/bash";
}
terminal = TerminalDisplay::create( win, fontMono, PixelDensity::dpToPx( 11 ),
win->getSize().asFloat(), shell, {}, "" );
win->getSize().asFloat() );
}
win->getInput()->pushCallback( &inputCallback );