mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
lookup_blitset: ascii check comes at the end
This commit is contained in:
parent
c64de96cbf
commit
7e4e3b71f8
@ -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…
x
Reference in New Issue
Block a user