extract_clrs: drop redundant nilayer param

pull/2122/head
nick black 3 years ago
parent ae3ada45f3
commit 83976d7fd1
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -456,7 +456,7 @@ block_on_input(tinfo* ti, const struct timespec* ts){
return -1;
#else
struct pollfd pfd = {
.fd = ti->input->infd,
.fd = ti->input.infd,
.events = POLLIN,
.revents = 0,
};
@ -1690,7 +1690,8 @@ scan_for_clrs(ncinputlayer* ni){
// appropriate. we can be interrupted by a new user context. we enter holding
// the input lock, and leave holding the input lock, giving it up only while
// blocking for readable action.
void ncinput_extract_clrs(tinfo* ti, ncinputlayer* ni){
void ncinput_extract_clrs(tinfo* ti){
ncinputlayer* ni = &ti->input;
do{
if(ni->inputbuf_occupied){
scan_for_clrs(ni);

@ -57,7 +57,7 @@ int cbreak_mode(struct tinfo* ti);
// assuming the user context is not active, go through current data looking
// for a cursor location report. if we find none, block on input, and read if
// appropriate. we can be interrupted by a new user context.
void ncinput_extract_clrs(struct tinfo* ti, struct ncinputlayer* nilayer);
void ncinput_extract_clrs(struct tinfo* ti);
#ifdef __cplusplus
}

@ -987,7 +987,7 @@ int locate_cursor(tinfo* ti, int* cursor_y, int* cursor_x){
}
// this can block. we must enter holding the input lock, and it will
// return to us holding the input lock.
ncinput_extract_clrs(&ti->input);
ncinput_extract_clrs(ti);
if( (clr = ti->input.creport_queue) ){
break;
}
@ -1004,7 +1004,7 @@ int locate_cursor(tinfo* ti, int* cursor_y, int* cursor_x){
*cursor_x = tmp;
}
free(clr);
#endif
#else
CONSOLE_SCREEN_BUFFER_INFO conbuf;
if(!GetConsoleScreenBufferInfo(ti->outhandle, &conbuf)){
logerror("couldn't get cursor info\n");
@ -1013,5 +1013,6 @@ int locate_cursor(tinfo* ti, int* cursor_y, int* cursor_x){
*cursor_y = conbuf.dwCursorPosition.Y;
*cursor_x = conbuf.dwCursorPosition.X;
loginfo("got a report from y=%d x=%d\n", *cursor_y, *cursor_x);
#endif
return 0;
}

Loading…
Cancel
Save