notcurses-view: remove unused variable 'gotinput'

pull/1208/head
nick black 4 years ago
parent ea131b9b11
commit 97c2d53abf
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -31,8 +31,8 @@ get_tty_fd(const char* dev){
static bool static bool
is_linux_console(int fd){ is_linux_console(int fd){
int mode, r; int mode;
if( (r = ioctl(fd, KDGETMODE, &mode)) ){ if(ioctl(fd, KDGETMODE, &mode)){
fprintf(stderr, "Not a Linux console, KDGETMODE failed (%s)\n", strerror(errno)); fprintf(stderr, "Not a Linux console, KDGETMODE failed (%s)\n", strerror(errno));
return false; return false;
} }

@ -123,9 +123,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
ncplane_dim_yx(vopts->n, &oldy, &oldx); ncplane_dim_yx(vopts->n, &oldy, &oldx);
uint64_t absnow = timespec_to_ns(abstime); uint64_t absnow = timespec_to_ns(abstime);
char32_t keyp; char32_t keyp;
bool gotinput; for( ; ; ){
do{
gotinput = false;
struct timespec interval; struct timespec interval;
clock_gettime(CLOCK_MONOTONIC, &interval); clock_gettime(CLOCK_MONOTONIC, &interval);
uint64_t nsnow = timespec_to_ns(&interval); uint64_t nsnow = timespec_to_ns(&interval);
@ -138,7 +136,6 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
if(keyp == (char32_t)-1){ if(keyp == (char32_t)-1){
break; break;
} }
gotinput = true;
if(keyp == ' '){ if(keyp == ' '){
if((keyp = nc.getc(true)) == (char32_t)-1){ if((keyp = nc.getc(true)) == (char32_t)-1){
return -1; return -1;
@ -168,7 +165,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
continue; continue;
} }
return 1; return 1;
}while(gotinput); }
return 0; return 0;
} }

Loading…
Cancel
Save