ncdirect_canopen_images: use notcurses_canopen_images() #1300

This commit is contained in:
nick black 2021-01-18 17:12:27 -05:00
parent 1631818784
commit 899ef3e62e
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -484,7 +484,7 @@ ncdirectv* ncdirect_render_frame(ncdirect* n, const char* file,
ncvisual_destroy(ncv); ncvisual_destroy(ncv);
return nullptr; return nullptr;
} }
//fprintf(stderr, "render %d/%d to %d+%dx%d scaling: %d\n", ncv->rows, ncv->cols, leny, lenx, scale); //fprintf(stderr, "render %d/%d to %d+%d scaling: %d\n", ncv->rows, ncv->cols, leny, lenx, scale);
auto bset = rgba_blitter_low(n->utf8, n->tcache.sextants, scale, true, blitter); auto bset = rgba_blitter_low(n->utf8, n->tcache.sextants, scale, true, blitter);
if(!bset){ if(!bset){
ncvisual_destroy(ncv); ncvisual_destroy(ncv);
@ -1060,16 +1060,8 @@ int ncdirect_double_box(ncdirect* n, uint64_t ul, uint64_t ur,
} }
// Can we load images? This requires being built against FFmpeg/OIIO. // Can we load images? This requires being built against FFmpeg/OIIO.
bool ncdirect_canopen_images(const ncdirect* n){ bool ncdirect_canopen_images(const ncdirect* n __attribute__ ((unused))){
(void)n; return notcurses_canopen_images(NULL);
#ifdef USE_FFMPEG
return true;
#else
#ifdef USE_OIIO
return true;
#endif
#endif
return false;
} }
// Is our encoding UTF-8? Requires LANG being set to a UTF8 locale. // Is our encoding UTF-8? Requires LANG being set to a UTF8 locale.