From b6995ca0113611613d311250eabfc354658d46a7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Nov 2009 21:08:48 +0100 Subject: player_control: removed the global variable "pc" Allocate a player_control object where needed, and pass it around. Each "client" object is associated with a "player_control" instance. This prepares multi-player support. --- src/stats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/stats.c') diff --git a/src/stats.c b/src/stats.c index 673d531e..5a90fad8 100644 --- a/src/stats.c +++ b/src/stats.c @@ -25,6 +25,7 @@ #include "client.h" #include "player_control.h" #include "strset.h" +#include "client_internal.h" struct stats stats; @@ -114,7 +115,7 @@ int stats_print(struct client *client) stats.album_count, stats.song_count, (long)g_timer_elapsed(stats.timer, NULL), - (long)(pc_get_total_play_time() + 0.5), + (long)(pc_get_total_play_time(client->player_control) + 0.5), stats.song_duration, db_get_mtime()); return 0; -- cgit v1.2.3