]> Johnzone git - FakeRadio.git/commitdiff
do not restart playing intro if a channel is pressed
authorJohn Janus <mail@johnzone.org>
Sun, 17 Sep 2017 09:18:39 +0000 (11:18 +0200)
committerJohn Janus <mail@johnzone.org>
Sun, 17 Sep 2017 09:18:39 +0000 (11:18 +0200)
simple_try.c

index bac2ecc2399e0595c9a5c59f6d167d75fee665d1..64c0bcd4f0eb4bad0560eb5d7cbc753f3fd2bc2c 100644 (file)
@@ -48,7 +48,7 @@ void pwrBtn(void) {
 }
 
 void chnl1Btn(void) {
-    if (delaying) return;
+    if (delaying || !pwrOn) return;
     pthread_mutex_lock(mut);
     chnl1 = true;
     pthread_mutex_unlock(mut);
@@ -56,7 +56,7 @@ void chnl1Btn(void) {
 }
 
 void chnl2Btn(void) {
-    if (delaying) return;
+    if (delaying || !pwrOn) return;
     pthread_mutex_lock(mut);
     chnl1 = false;
     pthread_mutex_unlock(mut);