Code

screen swap works with song/lyrics screens
[ncmpc.git] / src / screen_song.c
index cc4d53801fce2c202aee86ea27954386815039ee..74d2652728ccfd1d142be267bf48a5358c390adf 100644 (file)
@@ -362,10 +362,18 @@ screen_song_cmd(mpdclient_t *c, command_t cmd)
                        screen_lyrics_switch(c, current.played_song);
                        return true;
                }
-
                return false;
+
 #endif
 
+       case CMD_SCREEN_SWAP:
+               if (current.selected_song != NULL)
+                       screen_swap(c, current.selected_song);
+               else
+               // No need to check if this is null - we'd pass null anyway
+                       screen_swap(c, current.played_song);
+               return true;
+
        default:
                break;
        }