projects
/
nihav-player.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pause playback when prompt is active
[nihav-player.git]
/
sndplay
/
src
/
main.rs
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::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", ' ');
};
if !no_display {
print!("\r{:60}\r", ' ');