mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
notcurses-view: keypress skips, not aborts
This commit is contained in:
parent
acef43c759
commit
a56846468e
@ -130,12 +130,13 @@ int main(int argc, char** argv){
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||
if(ncvisual_stream(nc, ncv, &averr, perframe, &frames)){
|
||||
int r = ncvisual_stream(nc, ncv, &averr, perframe, &frames);
|
||||
if(r < 0){ // positive is intentional abort
|
||||
av_make_error_string(errbuf.data(), errbuf.size(), averr);
|
||||
notcurses_stop(nc);
|
||||
std::cerr << "Error decoding " << argv[i] << ": " << errbuf.data() << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}else if(r == 0){
|
||||
char32_t ie = notcurses_getc_blocking(nc, nullptr);
|
||||
if(ie == (char32_t)-1){
|
||||
break;
|
||||
@ -151,6 +152,7 @@ int main(int argc, char** argv){
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
ncvisual_destroy(ncv);
|
||||
}
|
||||
if(notcurses_stop(nc)){
|
||||
|
Loading…
Reference in New Issue
Block a user