From e15613b5a6ef52d11ae0148c003ea7da0823aae1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 25 Mar 2009 07:49:59 +0100 Subject: [PATCH] screen: check if song and lyrics screens are enabled The patch "screen swap works with song/lyrics screens" broke the build, because it didn't check whether the song screen and the lyrics screen were enabled. --- src/screen.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/screen.c b/src/screen.c index 6225825..85f1250 100644 --- a/src/screen.c +++ b/src/screen.c @@ -96,10 +96,16 @@ screen_swap(struct mpdclient *c, const struct mpd_song *song) { if (song != NULL) { + if (false) + { /* just a hack to make the ifdefs less ugly */ } +#ifdef ENABLE_SONG_SCREEN if (mode_fn_prev == &screen_song) screen_song_switch(c, song); +#endif +#ifdef ENABLE_LYRICS_SCREEN else if (mode_fn_prev == &screen_lyrics) screen_lyrics_switch(c, song); +#endif else screen_switch(mode_fn_prev, c); } -- 2.30.2