void irSaveSettings() { cfgSetInt("PatchRegion",irsettings.PatchRegion); cfgSetInt("LoadDefaultImage",irsettings.LoadDefaultImage); cfgSetStr("DefaultImage",irsettings.DefaultImage); cfgSetStr("LastImage",irsettings.LastImage); }
void SaveSettings() { Cofnig_UpdateMenuSelections(); //load default settings before init cfgSetInt("BufferSize",settings.BufferSize); cfgSetInt("LimitFPS",settings.LimitFPS); cfgSetInt("HW_mixing",settings.HW_mixing); cfgSetInt("SoundRenderer",settings.SoundRenderer); cfgSetInt("GlobalFocus",settings.GlobalFocus); cfgSetInt("BufferCount",settings.BufferCount); cfgSetInt("CDDAMute",settings.CDDAMute); cfgSetInt("GlobalMute",settings.GlobalMute); cfgSetInt("DSPEnabled",settings.DSPEnabled); cfgSetInt("Volume",max(0,min(settings.Volume,100))); }
void dlSetStartValue(struct DemoLib *demolib, int value) { if (!demolib||demolib->startValue ==value) return; cfgSetInt(KEY_START_VALUE, value); demolib->startValue = value; }
static void Log_setCfg(tpAniSirGlobal pMac, tANI_U16 cfgId, tANI_U32 val) { sysLog(pMac, LOGE, FL("Set %s(0x%x) to value 0x%x\n"), gCfgParamName[cfgId], cfgId, val); if (cfgSetInt(pMac, (tANI_U16)cfgId, val) != eSIR_SUCCESS) sysLog(pMac, LOGE, FL("setting cfgId 0x%x to value 0x%x failed \n"), cfgId, val); return; }
eHalStatus p2pRemainOnChannel(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 channel, tANI_U32 duration, remainOnChanCallback callback, void *pContext #ifdef WLAN_FEATURE_P2P_INTERNAL , eP2PRemainOnChnReason reason #endif ) { eHalStatus status = eHAL_STATUS_SUCCESS; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); tSmeCmd *pRemainChlCmd = NULL; tANI_U32 phyMode; pRemainChlCmd = smeGetCommandBuffer(pMac); if(pRemainChlCmd == NULL) return eHAL_STATUS_FAILURE; if (SIR_BAND_5_GHZ == GetRFBand(channel)) { phyMode = WNI_CFG_PHY_MODE_11A; } else { phyMode = WNI_CFG_PHY_MODE_11G; } cfgSetInt(pMac, WNI_CFG_PHY_MODE, phyMode); do { /* call set in context */ pRemainChlCmd->command = eSmeCommandRemainOnChannel; pRemainChlCmd->sessionId = sessionId; pRemainChlCmd->u.remainChlCmd.chn = channel; pRemainChlCmd->u.remainChlCmd.duration = duration; pRemainChlCmd->u.remainChlCmd.callback = callback; pRemainChlCmd->u.remainChlCmd.callbackCtx = pContext; //Put it at the head of the Q if we just finish finding the peer and ready to send a frame #ifdef WLAN_FEATURE_P2P_INTERNAL smePushCommand(pMac, pRemainChlCmd, (eP2PRemainOnChnReasonSendFrame == reason)); #else csrQueueSmeCommand(pMac, pRemainChlCmd, eANI_BOOLEAN_FALSE); #endif } while(0); smsLog(pMac, LOGW, "exiting function %s\n", __FUNCTION__); return(status); }
/* --------------------------------------------------------------------------- \fn p2pRemainOnChannel \brief API to post the remain on channel command. \param hHal - The handle returned by macOpen. \param sessinId - HDD session ID. \param channel - Channel to remain on channel. \param duration - Duration for which we should remain on channel \param callback - callback function. \param pContext - argument to the callback function \return eHalStatus -------------------------------------------------------------------------------*/ eHalStatus p2pRemainOnChannel(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 channel, tANI_U32 duration, remainOnChanCallback callback, void *pContext, tANI_U8 isP2PProbeReqAllowed ) { eHalStatus status = eHAL_STATUS_SUCCESS; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); tSmeCmd *pRemainChlCmd = NULL; tANI_U32 phyMode; pRemainChlCmd = smeGetCommandBuffer(pMac); if(pRemainChlCmd == NULL) return eHAL_STATUS_FAILURE; if (SIR_BAND_5_GHZ == GetRFBand(channel)) { phyMode = WNI_CFG_PHY_MODE_11A; } else { phyMode = WNI_CFG_PHY_MODE_11G; } cfgSetInt(pMac, WNI_CFG_PHY_MODE, phyMode); do { /* call set in context */ pRemainChlCmd->command = eSmeCommandRemainOnChannel; pRemainChlCmd->sessionId = sessionId; pRemainChlCmd->u.remainChlCmd.chn = channel; pRemainChlCmd->u.remainChlCmd.duration = duration; pRemainChlCmd->u.remainChlCmd.isP2PProbeReqAllowed = isP2PProbeReqAllowed; pRemainChlCmd->u.remainChlCmd.callback = callback; pRemainChlCmd->u.remainChlCmd.callbackCtx = pContext; //Put it at the head of the Q if we just finish finding the peer and ready to send a frame status = csrQueueSmeCommand(pMac, pRemainChlCmd, eANI_BOOLEAN_FALSE); } while(0); smsLog(pMac, LOGW, "exiting function %s", __func__); return(status); }