ncdirect_stream(): if bitmap wraps the screen, move up one more y #1820

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

@ -1302,7 +1302,11 @@ int ncdirect_stream(ncdirect* n, const char* filename, ncstreamcb streamer,
int thisid = -1;
do{
if(y > 0){
ncdirect_cursor_up(n, y);
if(x == ncdirect_dim_x(n)){
x = 0;
++y;
}
ncdirect_cursor_up(n, y - 1);
}
if(x > 0){
ncdirect_cursor_left(n, x);

@ -80,9 +80,10 @@ int ncvisual_blit(ncvisual* ncv, int rows, int cols, ncplane* n,
return 0;
}
}
// generic implementation
int stride = 4 * cols;
uint32_t* data = resize_bitmap(ncv->data, ncv->pixy, ncv->pixx,
ncv->rowstride, rows, cols, stride);
ncv->rowstride, rows, cols, stride);
if(data == NULL){
return -1;
}

Loading…
Cancel
Save