2 Replies Latest reply on May 8, 2013 7:22 AM by dipika

    AMD Display Library : Switching from EXTENDED desktop mode to duplicate mode


      Hey there,


      I am trying to enable eyefinity. For that first I want to switch from extended to Duplicate Display Group Status. For switching from EXTENDED mode to DUPLICATE mode first I am using ADL_Display_DisplayMapConfig_Get to get the display targets and display maps and then I am setting iDisplayMapValue of display map to ADL_DISPLAY_DISPLAYMAP_MANNER_CLONE but there is no change in the display Mode. Following is the code snippet.


                if (ADL_OK != ADL_Display_DisplayMapConfig_Get( lpAdapterInfo[iCurrentAdapter].iAdapterIndex,

      &iNumDisplayMap, &lpDisplayMap,

                                                                           &iNumDisplayTarget, &lpDisplayTarget,

                                                                           ADL_DISPLAY_DISPLAYMAP_OPTION_GPUINFO ) )


      PRINTF("ADL_Display_DisplayMapConfig_Get() failed\n");

      iReturnValue = FALSE;




      lpDisplayMap->iDisplayMapValue = ADL_DISPLAY_DISPLAYMAP_MANNER_CLONE;

               if(ADL_OK !=  ADL_Display_DisplayMapConfig_Set( lpAdapterInfo[iCurrentAdapter].iAdapterIndex,




      lpDisplayTarget    ))


      PRINTF("ADL_Display_DisplayMapConfig_Set Cloning Desktops failed\n");



      I am not getting what I am doing wrong here. Any help, suggestions are appreciated.

        • Re: AMD Display Library : Switching from EXTENDED desktop mode to duplicate mode

          To enable the clone mode you can use the following code. It shows how to put 2 displays into clone mode:


          int                  nNumModes;

          ADLMode*            pModes = NULL;

          ADLDisplayMap       mapArray;   

          ADLDisplayTarget*   pDisplayTargets = NULL;

          memset(&(mapArray), 0, sizeof(ADLDisplayMap));

          mapArray.iNumDisplayTarget = 2;

          mapArray.iDisplayMapIndex  = 0;


          // get current display modes

          if (ADL_Display_Modes_Get(nAdapterIdx, -1, &nNumModes, &pModes) != ADL_OK)

                  return false;


          mapArray.displayMode.iAdapterIndex  = nAdapterIdx;

          mapArray.displayMode.iModeFlag      = pModes[0].iModeFlag;

          mapArray.displayMode.iOrientation   = pModes[0].iOrientation;

          mapArray.displayMode.fRefreshRate   = pModes[0].fRefreshRate;

          mapArray.displayMode.iColourDepth   = pModes[0].iColourDepth;

          mapArray.displayMode.iXPos          = pModes[0].iXPos;

          mapArray.displayMode.iYPos          = pModes[0].iYPos;

          mapArray.displayMode.iXRes          = pModes[0].iXRes;

          mapArray.displayMode.iYRes          = pModes[0].iYRes;

          mapArray.iDisplayMapValue           = ADL_DISPLAY_DISPLAYMAP_MANNER_CLONE;


          // allocate display target for both displays

          pDisplayTargets = (ADLDisplayTarget*) ADL_Alloc(2 * sizeof(ADLDisplayTarget));

          memset(pDisplayTargets, 0, 2 * sizeof(ADLDisplayTarget));


          pDisplayTargets[0].displayID.iDisplayLogicalAdapterIndex = nAdapterIdx;

          pDisplayTargets[0].displayID.iDisplayLogicalIndex = pDspIndexList[0];

          pDisplayTargets[0].iDisplayMapIndex = 0;

          pDisplayTargets[1].displayID.iDisplayLogicalAdapterIndex = nAdapterIdx;

          pDisplayTargets[1].displayID.iDisplayLogicalIndex = pDspIndexList[1];

          pDisplayTargets[1].iDisplayMapIndex = 0;

          ADL_Display_DisplayMapConfig_Set(nAdapterIdx,1,&mapArray, 2, pDisplayTargets);




          pDspIndexlist contains the iDisplayLogicalIndex of the display that can be obtained by calling ADL_Display_DisplayInfo_Get