diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2008-09-09 13:25:13 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2008-09-09 13:25:13 +0200 |
commit | a0235218909a33adbdc6eb4eb3afff2911a5987b (patch) | |
tree | c3c25c36d7be002222be55db5b09bb63d8eaad70 | |
parent | bdf53282f3f2a20ff1b112469e1c1266a0563d11 (diff) | |
download | pianobar-windows-a0235218909a33adbdc6eb4eb3afff2911a5987b.tar.gz pianobar-windows-a0235218909a33adbdc6eb4eb3afff2911a5987b.tar.bz2 pianobar-windows-a0235218909a33adbdc6eb4eb3afff2911a5987b.zip |
Don't poll *that* often
-rw-r--r-- | src/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -204,7 +204,10 @@ int main (int argc, char **argv) { } /* in the meantime: wait for user actions */ - if (poll (&polls, 1, 1000) > 0) { + /* FIXME: uhm, this may work, but I guess there's a better solution. */ + if (poll (&polls, 1, (player.mode >= PLAYER_INITIALIZED && + player.mode < PLAYER_FINISHED_PLAYBACK && + player.doPause == 0 ? 1000 : -1)) > 0) { read (fileno (stdin), &buf, sizeof (buf)); curShortcut = settings.keys; while (curShortcut != NULL) { |