From 8376504a34a1bce1cefb7c3fc02d893736cc9f45 Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 25 Nov 2017 01:56:51 +0000 Subject: [PATCH] Fix menu.cpp build failure for sdlmixer=0 When sdlmixer=0, opt_sm_mtype1 is not defined, but was used. Preprocess out the use. --- similar/main/menu.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/similar/main/menu.cpp b/similar/main/menu.cpp index 365a719f2..7ae7bbb61 100644 --- a/similar/main/menu.cpp +++ b/similar/main/menu.cpp @@ -2087,11 +2087,18 @@ int sound_menu_items::menuset(newmenu *, const d_event &event, sound_menu_items GameCfg.MusicType = MUSIC_TYPE_NONE; replay = 1; } + /* + * When builtin music is enabled, the next line expands to + * `#if +1 + 0`; when it is disabled, the line expands to + * `#if + 0`. + */ +#if DXX_SOUND_ADDON_MUSIC_MENU_ITEM(COUNT) + 0 else if (citem == opt_sm_mtype1) { GameCfg.MusicType = MUSIC_TYPE_BUILTIN; replay = 1; } +#endif else if (citem == opt_sm_mtype2) { GameCfg.MusicType = MUSIC_TYPE_REDBOOK;