From 7e4e3b71f8b3099192178674f8bc12c28797b7f7 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 7 Feb 2021 18:12:56 -0500 Subject: [PATCH] lookup_blitset: ascii check comes at the end --- src/lib/blitset.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/blitset.h b/src/lib/blitset.h index 41e8f70d7..0786ddf6d 100644 --- a/src/lib/blitset.h +++ b/src/lib/blitset.h @@ -8,14 +8,6 @@ lookup_blitset(const tinfo* tcache, ncblitter_e setid, bool may_degrade) { if(setid == NCBLIT_DEFAULT){ // ought have resolved NCBLIT_DEFAULT before now return NULL; } - // the only viable blitter in ASCII is NCBLIT_1x1 - if(!tcache->utf8 && setid != NCBLIT_1x1){ - if(may_degrade){ - setid = NCBLIT_1x1; - }else{ - return NULL; - } - } // without braille support, NCBLIT_BRAILLE decays to NCBLIT_3x2 if(!tcache->braille && setid == NCBLIT_BRAILLE){ if(may_degrade){ @@ -32,6 +24,14 @@ lookup_blitset(const tinfo* tcache, ncblitter_e setid, bool may_degrade) { return NULL; } } + // the only viable blitter in ASCII is NCBLIT_1x1 + if(!tcache->utf8 && setid != NCBLIT_1x1){ + if(may_degrade){ + setid = NCBLIT_1x1; + }else{ + return NULL; + } + } const struct blitset* bset = notcurses_blitters; while(bset->egcs){ if(bset->geom == setid){