From ecb118f1edab572a904890eddafd3b11c0a79a79 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 8 Oct 2009 15:22:39 +0200 Subject: state_file: save only if something has changed If nothing has changed since the last save, don't save the state file. Saving will spin up the hard drive, which is undesirable on hosts where MPD is idling in background. --- src/volume.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/volume.c') diff --git a/src/volume.c b/src/volume.c index 5f4a66837..8b33f592d 100644 --- a/src/volume.c +++ b/src/volume.c @@ -122,3 +122,9 @@ void save_sw_volume_state(FILE *fp) { fprintf(fp, SW_VOLUME_STATE "%u\n", volume_software_set); } + +unsigned +sw_volume_state_get_hash(void) +{ + return volume_software_set; +} -- cgit v1.2.3