This commit is contained in:
Péter Ujfalusi 2024-07-29 03:26:27 +08:00 committed by GitHub
commit 9240cb9f6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1618,6 +1618,8 @@ static void do_pause(void)
error(_("pause push error: %s"), snd_strerror(err)); error(_("pause push error: %s"), snd_strerror(err));
return; return;
} }
fprintf(stderr, _("\r=== PAUSE === "));
fflush(stderr);
while (1) { while (1) {
b = wait_for_input(); b = wait_for_input();
if (b == ' ' || b == '\r') { if (b == ' ' || b == '\r') {
@ -1642,8 +1644,6 @@ static void check_stdin(void)
while (read(fileno(stdin), &b, 1) == 1) { while (read(fileno(stdin), &b, 1) == 1) {
if (b == ' ' || b == '\r') { if (b == ' ' || b == '\r') {
while (read(fileno(stdin), &b, 1) == 1); while (read(fileno(stdin), &b, 1) == 1);
fprintf(stderr, _("\r=== PAUSE === "));
fflush(stderr);
do_pause(); do_pause();
fprintf(stderr, " \r"); fprintf(stderr, " \r");
fflush(stderr); fflush(stderr);