fix(video2x): remove redundant newline statements

Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
k4yt3x 2024-12-21 00:00:00 +00:00
parent 5c4d23bc97
commit 2afbeab2aa
No known key found for this signature in database

View File

@ -146,11 +146,7 @@ int main(int argc, char **argv) {
}
} else if (ch == 'q' || ch == 'Q') {
// Abort processing
if (logger_sink->get_needs_newline()) {
putchar('\n');
}
video2x::logger()->warn("Aborting gracefully; press Ctrl+C to terminate forcefully.");
logger_sink->set_needs_newline(false);
video_processor.abort();
break;
}
@ -210,12 +206,6 @@ int main(int argc, char **argv) {
// Join the processing thread to ensure it completes before exiting
processing_thread.join();
// Print a newline if progress bar was displayed
if (logger_sink->get_needs_newline()) {
logger_sink->set_needs_newline(false);
std::cout << '\n';
}
// Print final message based on processing result
if (video_processor.get_state() == video2x::VideoProcessorState::Aborted) {
video2x::logger()->warn("Video processing aborted");