projects
/
nihav-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a727e0
)
pause playback when prompt is active
author
Kostya Shishkov
<kostya.shishkov@gmail.com>
Sat, 17 Oct 2020 08:08:26 +0000
(10:08 +0200)
committer
Kostya Shishkov
<kostya.shishkov@gmail.com>
Sat, 17 Oct 2020 08:08:26 +0000
(10:08 +0200)
sndplay/src/main.rs
patch
|
blob
|
blame
|
history
diff --git
a/sndplay/src/main.rs
b/sndplay/src/main.rs
index 377c2d1b11bb7b134f3a1b9e1bd5ad287a61d175..990507d963cd452e48f1c3e787e19c4725923f73 100644
(file)
--- a/
sndplay/src/main.rs
+++ b/
sndplay/src/main.rs
@@
-466,8
+466,18
@@
impl Player {
Command::Debug => {
self.debug = !self.debug;
},
- Command::PauseDisplay => { no_display = true; },
- Command::ResumeDisplay => { no_display = false; },
+ Command::PauseDisplay => {
+ no_display = true;
+ if !self.paused {
+ device.pause();
+ }
+ },
+ Command::ResumeDisplay => {
+ no_display = false;
+ if !self.paused {
+ device.resume();
+ }
+ },
};
if !no_display {
print!("\r{:60}\r", ' ');