plane_blit_sixel(): proper sprixel id on all endians

pull/1418/head
nick black 3 years ago committed by Nick Black
parent 6ce1daee74
commit 90b0d39169

@ -1095,15 +1095,11 @@ plane_blit_sixel(ncplane* n, const char* s, int bytes, int leny, int lenx){
if(spx == NULL){
return -1;
}
char gcluster[4];
gcluster[0] = 2;
gcluster[1] = spx->id;
gcluster[2] = 0; // FIXME
gcluster[3] = 2; // FIXME
uint32_t gcluster = htole(0x02000000ul) + htole(spx->id);
for(int y = 0 ; y < leny ; ++y){
for(int x = 0 ; x < lenx ; ++x){
nccell* c = ncplane_cell_ref_yx(n, y, x);
memcpy(&c->gcluster, gcluster, sizeof(gcluster));
memcpy(&c->gcluster, &gcluster, sizeof(gcluster));
c->width = lenx;
}
}

@ -144,7 +144,6 @@ int kitty_blit_inner(ncplane* nc, int linesize, int leny, int lenx,
return 1;
}
int kitty_blit(ncplane* nc, int linesize, const void* data, int begy, int begx,
int leny, int lenx, const blitterargs* bargs){
(void)begy;

Loading…
Cancel
Save