Fixed mplayer(1) detection.
authorlace <>
Sat, 27 Jan 2007 08:15:19 +0000 (08:15 +0000)
committerlace <>
Sat, 27 Jan 2007 08:15:19 +0000 (08:15 +0000)
bin/fup

diff --git a/bin/fup b/bin/fup
index cdc8c50..a7fba95 100755 (executable)
--- a/bin/fup
+++ b/bin/fup
@@ -197,18 +197,18 @@ for (;;) {
                $on_now=0 if ($rx-$rx_last) > $RX_THRESHOLD;
                $on_now=0 if ($tx-$tx_last) > $TX_THRESHOLD;
                }
+       my $print=$on_now;
        my $input_idle=input_idle();
        my $mplayer_running=mplayer_running() if $input_idle;
        $on_now=1 if $input_idle && !$mplayer_running;
        $rx_last=$rx;
        $tx_last=$tx;
        push @history,$on_now;
-       my $print=$on_now;
-       $print=($on_now ? "." : "v") if $input_idle;
+       $print=($print ? "." : "v") if $input_idle;
        $print="M" if $mplayer_running;
        $print="*" if $ignore_read;
        print($print);
-       history(1,($input_idle && !$mplayer_running ? 0 : $STABILIZE_ON));
+       history(1,(($input_idle && !$mplayer_running) ? 0 : $STABILIZE_ON));
        history(0,$STABILIZE_OFF);
        $ignore_read=$ignore_write;
        $ignore_write=0;