mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
ncblit_bgrx: reimplement using ncvisual_blit() #2451
This commit is contained in:
parent
ca38f7d5fc
commit
39f1d9b4cc
@ -997,9 +997,18 @@ int ncblit_bgrx(const void* data, int linesize, const struct ncvisual_options* v
|
||||
if(rdata == NULL){
|
||||
return -1;
|
||||
}
|
||||
int r = ncblit_rgba(rdata, linesize, vopts);
|
||||
struct ncvisual* ncv = ncvisual_from_rgba(rdata, vopts->leny, linesize, vopts->lenx);
|
||||
if(ncv == NULL){
|
||||
free(rdata);
|
||||
return -1;
|
||||
}
|
||||
free(rdata);
|
||||
return r;
|
||||
if(ncvisual_blit(ncplane_notcurses(vopts->n), ncv, vopts) == NULL){
|
||||
ncvisual_destroy(ncv);
|
||||
return -1;
|
||||
}
|
||||
ncvisual_destroy(ncv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ncblit_rgb_loose(const void* data, int linesize,
|
||||
|
Loading…
Reference in New Issue
Block a user