mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
notcurses-view: remove unused variable 'gotinput'
This commit is contained in:
parent
ea131b9b11
commit
97c2d53abf
@ -31,8 +31,8 @@ get_tty_fd(const char* dev){
|
||||
|
||||
static bool
|
||||
is_linux_console(int fd){
|
||||
int mode, r;
|
||||
if( (r = ioctl(fd, KDGETMODE, &mode)) ){
|
||||
int mode;
|
||||
if(ioctl(fd, KDGETMODE, &mode)){
|
||||
fprintf(stderr, "Not a Linux console, KDGETMODE failed (%s)\n", strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
@ -123,9 +123,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
|
||||
ncplane_dim_yx(vopts->n, &oldy, &oldx);
|
||||
uint64_t absnow = timespec_to_ns(abstime);
|
||||
char32_t keyp;
|
||||
bool gotinput;
|
||||
do{
|
||||
gotinput = false;
|
||||
for( ; ; ){
|
||||
struct timespec interval;
|
||||
clock_gettime(CLOCK_MONOTONIC, &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){
|
||||
break;
|
||||
}
|
||||
gotinput = true;
|
||||
if(keyp == ' '){
|
||||
if((keyp = nc.getc(true)) == (char32_t)-1){
|
||||
return -1;
|
||||
@ -168,7 +165,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
|
||||
continue;
|
||||
}
|
||||
return 1;
|
||||
}while(gotinput);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user