fade.c: Stop playing if no sleep mode was given.
authorAndre Noll <maan@systemlinux.org>
Thu, 24 Apr 2008 17:06:02 +0000 (19:06 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 24 Apr 2008 17:06:02 +0000 (19:06 +0200)
fade.c

diff --git a/fade.c b/fade.c
index 6b87680..48faed8 100644 (file)
--- a/fade.c
+++ b/fade.c
@@ -238,7 +238,10 @@ static int sweet_dreams(void)
                if (ret < 0)
                        return ret;
        }
-       change_afs_mode_and_play(sleep_mode);
+       if (conf.sleep_mode_given)
+               change_afs_mode_and_play(sleep_mode);
+       else
+               client_cmd("stop");
        if (!wf)
                return 1;
        for (;;) {