3 Replies Latest reply on Oct 10, 2013 7:20 AM by jossgray

    ADL_Display_Modes_Set giving ADL_ERR_INVALID_PARAM


      I'm struggling to get ADL_Display_Modes_Set to work. Constantly getting ADL_ERR_INVALID_PARAM


      Would someone be able to let me know what fields in the ADLMode structure are required for this function and what checks are done on that structure so I can find out where I'm going wrong?





        • Re: ADL_Display_Modes_Set giving ADL_ERR_INVALID_PARAM



          first you need to determine the Adapter Index (AapterInfo.iAdapterIndex)  and the DisplayLogicalIndex (ADLDisplayInfo.displayID.iDisplayLogicalIndex) that belong to the display. You can do this by enumerating the mapped displays. The best is to first retrieve the current mode and just to update the parameters you want to change. Than you can use the Display_Modes_Set as follow:


          nModes   = 0;

          ADLMode* pMode    = NULL;


          // Get current disply mode information


          nADLErrCode = ADL_Display_Modes_Get(iAdapterIndex, DspLogicalIdx, &nModes, &pMode);


          if (nADLErrCode == ADL_OK)


             pMode[0].iXRes = nHres;
             pMode[0].iYRes = nVres;
             pMode[0].fRefreshRate = (float)Freq;


             // set new mode

             nADLErrCode = ADL_Display_Modes_Set(iAdapterIndex, DspLogicalIdx, nModes, pMode);



          Depending on the parameters you enter for the mode there might still be errors if the mode cannot be applied. E.g. applying a dual link resolution to a display that is connected through single link DVI. But in this case you should get an ADL_ERR an no ADL_ERR_INVALID_PARAM.