0 Replies Latest reply on May 9, 2013 7:21 AM by dipika

    How to map Displays in  ADL_Display_SLSMapConfig_Create ?

    dipika

      I have a 2 x 2 display set up and I want to enable eyefinity. After cloning all the desktops I am trying to arrange displays to get a SLS. I have written following piece of code for achieving this 

       

      if ( ADL_OK != ADL_Display_SLSMapConfig_Get ( lpAdapterInfo[iCurrentAdapter].iAdapterIndex, iSLSMapIndex, &SLSMap,

                                                            &iNumSLSTarget, &lpSLSTarget,

                                                            &iNumNativeMode, &lpNativeMode,

                                                            &iNumBezelMode, &lpBezelMode,

                                                            &iNumTransientMode, &lpTransientMode,

                                                            &iNumSLSOffset, &lpSLSOffset,

                                                            ADL_DISPLAY_SLSGRID_CAP_OPTION_RELATIVETO_CURRENTANGLE ) )

              {

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

                  iReturnValue = FALSE;

                  break;

              }

       

              SLSMap.iAdapterIndex = lpAdapterInfo[iCurrentAdapter].iAdapterIndex;

              SLSMap.grid.iSLSGridRow = row;

              SLSMap.grid.iSLSGridColumn = col;

              SLSMap.iNumSLSTarget = iNumDisplayTarget;

              SLSMap.grid.iSLSGridMask = ADL_DISPLAY_SLSGRID_ORIENTATION_000;

              SLSMap.iNumNativeMode = 3;

              SLSMap.iNumBezelOffset = 3;

              SLSMap.iNumBezelMode = 3;

             SLSMap.iSLSMapMask = ADL_DISPLAY_SLSMAPCONFIG_REARRANGE_OPTION_RELATIVETO_LANDSCAPE;

              SLSMap.iSLSMapValue = ADL_DISPLAY_SLSMAP_CURRENTCONFIG;  

       

                          for(int j = 0; j < iNumDisplayTarget; j++)

                          {

                                    lpSLSTarget[iCurrentSLSTarget].displayTarget.displayID.iDisplayLogicalIndex =                                                                                                 lpDisplayTarget[iCurrentDisplayTarget].displayID.iDisplayLogicalIndex;

       

                          }

              

               lpSLSTarget->iSLSTargetMask = ADL_DISPLAY_SLSMAPCONFIG_REARRANGE_OPTION_RELATIVETO_LANDSCAPE;

               lpSLSTarget->iSLSTargetValue = ADL_DISPLAY_SLSMAP_CURRENTCONFIG;  

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

                                                               SLSMap, iNumDisplayTarget,

                                                               lpSLSTarget,

                                                               iNumBezelMode,

                                                               &iSLSMapIndex,

                                                               ADL_DISPLAY_SLSGRID_CAP_OPTION_RELATIVETO_CURRENTANGLE

                                                             ) )

              {

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

                  iReturnValue = FALSE;

                  break;

              }

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

                                                       iSLSMapIndex,

                                                       iNumDisplayTarget,

                                                       lpSLSTarget,

                                                       SLSMap,

                                                       iOption          

                                                      ))

              {

                  PRINTF("Rearrange Display Failed");

              }

                       

      }

       

         /// Enabling Eyefinity

          if( ADL_OK != ADL_Display_SLSMapConfig_SetState          (primaryAdapterIndex, iSLSMapIndex, ADL_TRUE))

          {

              PRINTF("ADL_Display_SLSMapConfig_SetState Enabling Eyefinity failed\n");

             

          }

      None of the function is returning error and eyefinity gets enabled also but the display mapping is incorrect. Say if the correct configuration is

       

      3 1

      4 2

       

      then I am getting

       

      1 2

      4 3

       

      Please suggest me something, where I am doing wrong. Any suggestions are highly appreciated. Thanks