int CGUIDialogAudioDSPManager::helper_GetDialogId(CActiveAEDSPModePtr &ModePointer, AE_DSP_MENUHOOK_CAT &MenuHook, AE_DSP_ADDON &Addon, std::string AddonName) { int dialogId = 0; if (ModePointer->HasSettingsDialog()) { AE_DSP_MENUHOOKS hooks; // Find first general settings dialog about mode if (CServiceBroker::GetADSP().GetMenuHooks(ModePointer->AddonID(), AE_DSP_MENUHOOK_SETTING, hooks)) { for (unsigned int i = 0; i < hooks.size() && dialogId == 0; i++) { if (hooks[i].iRelevantModeId == ModePointer->AddonModeNumber()) { dialogId = hooks[i].iHookId; } } } // If nothing was present, check for playback settings if (dialogId == 0 && CServiceBroker::GetADSP().GetMenuHooks(ModePointer->AddonID(), MenuHook, hooks)) { for (unsigned int i = 0; i < hooks.size() && (dialogId == 0 || dialogId != -1); i++) { if (hooks[i].iRelevantModeId == ModePointer->AddonModeNumber()) { if (!hooks[i].bNeedPlayback) { dialogId = hooks[i].iHookId; } else { dialogId = -1; } } } } if (dialogId == 0) CLog::Log(LOGERROR, "DSP Dialog Manager - %s - Present marked settings dialog of mode %s on addon %s not found", __FUNCTION__, g_localizeStrings.GetAddonString(Addon->ID(), ModePointer->ModeName()).c_str(), AddonName.c_str()); } return dialogId; }
int CGUIDialogAudioDSPManager::helper_GetDialogId(CActiveAEDSPModePtr &ModePointer, AE_DSP_MENUHOOK_CAT &MenuHook, AE_DSP_ADDON &Addon, std::string AddonName) { int dialogId = 0; if (ModePointer->HasSettingsDialog()) { AE_DSP_MENUHOOKS hooks; if (dialogId == 0) CLog::Log(LOGERROR, "DSP Dialog Manager - %s - Present marked settings dialog of mode %s on addon %s not found", __FUNCTION__, g_localizeStrings.GetAddonString(Addon->ID(), ModePointer->ModeName()).c_str(), AddonName.c_str()); } return dialogId; }