From ff3142c4aa1fb03e0e048e26a20ee0c954693ecd Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Tue, 12 Jun 2018 22:53:11 +0200 Subject: [PATCH] Fixed for color > 16 --- src/foptiattr.cpp | 2 +- src/fterm.cpp | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/foptiattr.cpp b/src/foptiattr.cpp index 96008b0b..217f74ce 100644 --- a/src/foptiattr.cpp +++ b/src/foptiattr.cpp @@ -532,7 +532,7 @@ short FOptiAttr::vga2ansi (register short color) color = lookup_table[color]; } - else + else if ( color < 0 ) color = 0; return color; diff --git a/src/fterm.cpp b/src/fterm.cpp index 2bc8ba0b..430734f3 100644 --- a/src/fterm.cpp +++ b/src/fterm.cpp @@ -301,6 +301,8 @@ int FTerm::keyCorrection (const int& key) #if defined(__linux__) key_correction = linux->modifierKeyCorrection(key); +#else + key_correction = key; #endif return key_correction; @@ -438,15 +440,17 @@ bool FTerm::setOldFont() else if ( isLinuxTerm() ) { retval = linux->loadOldFont(fc::character); + + if ( retval ) + { + shadow_character = linux->hasShadowCharacter(); + half_block_character = linux->hasHalfBlockCharacter(); + } } #endif if ( retval ) - { VGAFont = NewFont = false; - shadow_character = linux->hasShadowCharacter(); - half_block_character = linux->hasHalfBlockCharacter(); - } return retval; }