aboutsummaryrefslogtreecommitdiffstats
path: root/src/player.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:08 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:08 +0200
commitb1de50f994841e1803da365965512b925dfcc027 (patch)
treeb4064cada0b0b0bb523cd9fa7fea57151eb352ed /src/player.c
parentefde884a134a3b9f1468eb743898f579fc88746e (diff)
downloadmpd-b1de50f994841e1803da365965512b925dfcc027.tar.gz
mpd-b1de50f994841e1803da365965512b925dfcc027.tar.xz
mpd-b1de50f994841e1803da365965512b925dfcc027.zip
converted PlayerControl.state to enum
Don't write CPP when you can express the same in C... macros vs enum is a good example for that.
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/player.c b/src/player.c
index bcecce79a..8f3f6a6e6 100644
--- a/src/player.c
+++ b/src/player.c
@@ -148,6 +148,9 @@ int playerPause(mpd_unused int fd)
int playerSetPause(int fd, int pause_flag)
{
switch (pc.state) {
+ case PLAYER_STATE_STOP:
+ break;
+
case PLAYER_STATE_PLAY:
if (pause_flag)
playerPause(fd);
@@ -176,7 +179,7 @@ int getPlayerTotalTime(void)
return (int)(pc.totalTime + 0.5);
}
-int getPlayerState(void)
+enum player_state getPlayerState(void)
{
return pc.state;
}