lookup_blitset: ascii check comes at the end

pull/1338/head
nick black 3 years ago
parent c64de96cbf
commit 7e4e3b71f8
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -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){

Loading…
Cancel
Save