mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
ncplane_move_yx: don't invoke sprixel_move on no movement
This commit is contained in:
parent
069084d435
commit
7f1310f4d1
@ -1966,12 +1966,14 @@ int ncplane_move_yx(ncplane* n, int y, int x){
|
||||
int dy, dx; // amount moved
|
||||
dy = (n->boundto->absy + y) - n->absy;
|
||||
dx = (n->boundto->absx + x) - n->absx;
|
||||
if(n->sprite){
|
||||
sprixel_movefrom(n->sprite, n->absy, n->absx);
|
||||
if(dy || dx){ // don't want to trigger sprixel_movefrom() if unneeded
|
||||
if(n->sprite){
|
||||
sprixel_movefrom(n->sprite, n->absy, n->absx);
|
||||
}
|
||||
n->absx += dx;
|
||||
n->absy += dy;
|
||||
move_bound_planes(n->blist, dy, dx);
|
||||
}
|
||||
n->absx += dx;
|
||||
n->absy += dy;
|
||||
move_bound_planes(n->blist, dy, dx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user