From: Max Kellermann Date: Wed, 25 Mar 2009 06:49:59 +0000 (+0100) Subject: screen: check if song and lyrics screens are enabled X-Git-Tag: release-0.14~53 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e15613b5a6ef52d11ae0148c003ea7da0823aae1;p=ncmpc.git 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. --- 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); }