mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
[WIP] testing ways to get all displays
Trying different ways to get a list of all the connnected displays via the AMD ADL library. It seems pretty onerous at the moment, and seems like there is still a lot of work to go :/. AGS may have been the better way to go, but ADL at least had a C# example for me to start with!
This commit is contained in:
parent
854a359807
commit
3d0cf2542e
@ -99,6 +99,31 @@ namespace ATI.ADL
|
|||||||
/// <returns>return ADL Error Code</returns>
|
/// <returns>return ADL Error Code</returns>
|
||||||
internal delegate int ADL_Display_DeviceConfig_Get(int adapterIndex, int displayIndex, out ADLDisplayConfig displayConfig);
|
internal delegate int ADL_Display_DeviceConfig_Get(int adapterIndex, int displayIndex, out ADLDisplayConfig displayConfig);
|
||||||
|
|
||||||
|
/// <summary>Function to retrieve current display map configurations.</summary>
|
||||||
|
/// <remarks>This function retrieves the current display map configurations, including the controllers and adapters mapped to each display.</remarks>
|
||||||
|
/// <param name="adapterIndex"> The ADL index handle of the desired adapter. A value of -1 returns all display configurations for the system across multiple GPUs.</param>
|
||||||
|
/// <param name="numDisplayMap">Number of returned Display Maps</param>
|
||||||
|
/// <param name="displayMap">Array of ADLDisplayMap objects</param>
|
||||||
|
/// <param name="numDisplayTarget">Number of Display Targets</param>
|
||||||
|
/// <param name="displayTarget">Array of ADLDisplayTarget objects</param>
|
||||||
|
/// <param name="options">Options supplied</param>
|
||||||
|
/// <returns>return ADL Error Code</returns>
|
||||||
|
internal delegate int ADL_Display_DisplayMapConfig_Get(int adapterIndex, out int numDisplayMap, out IntPtr displayMap, out int numDisplayTarget, out IntPtr displayTarget, int options);
|
||||||
|
|
||||||
|
/// <summary>Function to validate a list of display configurations.</summary>
|
||||||
|
/// <remarks>This function allows the user to input a potential displays map and its targets. The function can also be used to obtain a list of display targets that can be added to this given topology and a list of display targets that can be removed from this given topology.</remarks>
|
||||||
|
/// <param name="adapterIndex"> The ADL index handle of the desired adapter. Cannot be set to -1 </param>
|
||||||
|
/// <param name="numDisplayMap">Number of Display Map</param>
|
||||||
|
/// <param name="displayMap">Number of Display Map</param>
|
||||||
|
/// <param name="numDisplayTarget">Number of Display Map</param>
|
||||||
|
/// <param name="displayTarget">Number of Display Map</param>
|
||||||
|
/// <param name="numPossibleAddTarget">Number of Display Map</param>
|
||||||
|
/// <param name="possibleAddTarget">Number of Display Map</param>
|
||||||
|
/// <param name="numPossibleRemoveTarget">Number of Display Map</param>
|
||||||
|
/// <param name="possibleRemoveTarget">Number of Display Map</param>
|
||||||
|
/// <returns>return ADL Error Code</returns>
|
||||||
|
internal delegate int ADL_Display_DisplayMapConfig_PossibleAddAndRemove(int adapterIndex, int numDisplayMap, ADLDisplayMap displayMap, int numDisplayTarget, ADLDisplayTarget displayTarget, out int numPossibleAddTarget, out IntPtr possibleAddTarget, out int numPossibleRemoveTarget, out IntPtr possibleRemoveTarget);
|
||||||
|
|
||||||
/// <summary>Function to retrieve an SLS configuration.</summary>
|
/// <summary>Function to retrieve an SLS configuration.</summary>
|
||||||
/// <param name="adapterIndex">Adapter Index</param>
|
/// <param name="adapterIndex">Adapter Index</param>
|
||||||
/// <param name="SLSMapIndex">Specifies the SLS map index to be queried.</param>
|
/// <param name="SLSMapIndex">Specifies the SLS map index to be queried.</param>
|
||||||
@ -155,7 +180,7 @@ namespace ATI.ADL
|
|||||||
#endregion ADLMode
|
#endregion ADLMode
|
||||||
|
|
||||||
#region ADLDisplayTarget
|
#region ADLDisplayTarget
|
||||||
/// <summary> ADLDisplayTarget Array</summary>
|
/// <summary> ADLDisplayTarget </summary>
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct ADLDisplayTarget
|
internal struct ADLDisplayTarget
|
||||||
{
|
{
|
||||||
@ -168,6 +193,15 @@ namespace ATI.ADL
|
|||||||
/// <summary> The bit mask identifies the display status. </summary>
|
/// <summary> The bit mask identifies the display status. </summary>
|
||||||
internal int DisplayTargetValue;
|
internal int DisplayTargetValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary> ADLDisplayTargetArray Array</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
internal struct ADLDisplayTargetArray
|
||||||
|
{
|
||||||
|
/// <summary> ADLDisplayTarget Array </summary>
|
||||||
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)ADL.ADL_MAX_DISPLAYS)]
|
||||||
|
internal ADLDisplayTarget[] ADLDisplayTarget;
|
||||||
|
}
|
||||||
#endregion ADLDisplayTarget
|
#endregion ADLDisplayTarget
|
||||||
|
|
||||||
#region ADLAdapterInfo
|
#region ADLAdapterInfo
|
||||||
@ -291,6 +325,33 @@ namespace ATI.ADL
|
|||||||
internal long Size;
|
internal long Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary> ADLDisplayMap Structure</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
internal struct ADLDisplayMap
|
||||||
|
{
|
||||||
|
/// <summary> The Display Mode for the current map.</summary>
|
||||||
|
internal ADLMode DisplayMode;
|
||||||
|
/// <summary> The current display map index. It is the OS desktop index. For example, if the OS index 1 is showing clone mode, the display map will be 1. </summary>
|
||||||
|
internal int DisplayMapIndex;
|
||||||
|
/// <summary> The bit mask identifies the number of bits DisplayMap is currently using. It is the sum of all the bit definitions defined in ADL_DISPLAY_DISPLAYMAP_MANNER_xxx.</summary>
|
||||||
|
internal int DisplayMapMask;
|
||||||
|
/// <summary> The bit mask identifies the display status. The detailed definition is in ADL_DISPLAY_DISPLAYMAP_MANNER_xxx.</summary>
|
||||||
|
internal int DisplayMapValue;
|
||||||
|
/// <summary> The first target array index in the Target array </summary>
|
||||||
|
internal int FirstDisplayTargetArrayIndex;
|
||||||
|
/// <summary> The number of display targets belongs to this map </summary>
|
||||||
|
internal int NumDisplayTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> ADLDisplayMapArray Array</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
internal struct ADLDisplayMapArray
|
||||||
|
{
|
||||||
|
/// <summary> ADLAdapterInfo Array </summary>
|
||||||
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)ADL.ADL_MAX_DISPLAYS)]
|
||||||
|
internal ADLDisplayMap[] ADLDisplayMap;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary> ADLAdapterCaps Structure</summary>
|
/// <summary> ADLAdapterCaps Structure</summary>
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct ADLAdapterCapsX2
|
internal struct ADLAdapterCapsX2
|
||||||
@ -478,6 +539,8 @@ namespace ATI.ADL
|
|||||||
internal static class ADL
|
internal static class ADL
|
||||||
{
|
{
|
||||||
#region Internal Constant
|
#region Internal Constant
|
||||||
|
/// <summary> Selects all adapters instead of aparticular single adapter</summary>
|
||||||
|
internal const int ADL_ADAPTER_INDEX_ALL = -1;
|
||||||
/// <summary> Define the maximum path</summary>
|
/// <summary> Define the maximum path</summary>
|
||||||
internal const int ADL_MAX_PATH = 256;
|
internal const int ADL_MAX_PATH = 256;
|
||||||
/// <summary> Define the maximum adapters</summary>
|
/// <summary> Define the maximum adapters</summary>
|
||||||
@ -626,13 +689,18 @@ namespace ATI.ADL
|
|||||||
[DllImport(Atiadlxx_FileName)]
|
[DllImport(Atiadlxx_FileName)]
|
||||||
internal static extern int ADL_AdapterX2_Caps(int adapterIndex, out ADLAdapterCapsX2 adapterCapabilities);
|
internal static extern int ADL_AdapterX2_Caps(int adapterIndex, out ADLAdapterCapsX2 adapterCapabilities);
|
||||||
|
|
||||||
|
|
||||||
[DllImport(Atiadlxx_FileName)]
|
[DllImport(Atiadlxx_FileName)]
|
||||||
internal static extern int ADL_Display_DisplayInfo_Get(int adapterIndex, ref int numDisplays, out IntPtr displayInfoArray, int forceDetect);
|
internal static extern int ADL_Display_DisplayInfo_Get(int adapterIndex, ref int numDisplays, out IntPtr displayInfoArray, int forceDetect);
|
||||||
|
|
||||||
[DllImport(Atiadlxx_FileName)]
|
[DllImport(Atiadlxx_FileName)]
|
||||||
internal static extern int ADL_Display_DeviceConfig_Get(int adapterIndex, int displayIndex, out ADLDisplayConfig displayConfig);
|
internal static extern int ADL_Display_DeviceConfig_Get(int adapterIndex, int displayIndex, out ADLDisplayConfig displayConfig);
|
||||||
|
|
||||||
|
[DllImport(Atiadlxx_FileName)]
|
||||||
|
internal static extern int ADL_Display_DisplayMapConfig_Get(int adapterIndex, out int numDisplayMap, out IntPtr displayMap, out int numDisplayTarget, out IntPtr displayTarget, int options);
|
||||||
|
|
||||||
|
[DllImport(Atiadlxx_FileName)]
|
||||||
|
internal static extern int ADL_Display_DisplayMapConfig_PossibleAddAndRemove(int adapterIndex, int numDisplayMap, ADLDisplayMap displayMap, int numDisplayTarget, ADLDisplayTarget displayTarget, out int numPossibleAddTarget, out IntPtr possibleAddTarget, out int numPossibleRemoveTarget, out IntPtr possibleRemoveTarget);
|
||||||
|
|
||||||
[DllImport(Atiadlxx_FileName)]
|
[DllImport(Atiadlxx_FileName)]
|
||||||
internal static extern int ADL_Display_SLSMapConfig_Get(int adapterIndex, int SLSMapIndex, ref ADLSLSMap SLSMap, ref int NumSLSTarget, out IntPtr SLSTargetArray, ref int lpNumNativeMode, out IntPtr NativeMode, ref int NumBezelMode, out IntPtr BezelMode, ref int NumTransientMode, out IntPtr TransientMode, ref int NumSLSOffset, out IntPtr SLSOffset, int iOption);
|
internal static extern int ADL_Display_SLSMapConfig_Get(int adapterIndex, int SLSMapIndex, ref ADLSLSMap SLSMap, ref int NumSLSTarget, out IntPtr SLSTargetArray, ref int lpNumNativeMode, out IntPtr NativeMode, ref int NumBezelMode, out IntPtr BezelMode, ref int NumTransientMode, out IntPtr TransientMode, ref int NumSLSOffset, out IntPtr SLSOffset, int iOption);
|
||||||
|
|
||||||
@ -947,6 +1015,52 @@ namespace ATI.ADL
|
|||||||
private static bool ADL_Display_DeviceConfig_Get_Check = false;
|
private static bool ADL_Display_DeviceConfig_Get_Check = false;
|
||||||
#endregion ADL_Display_DeviceConfig_Get
|
#endregion ADL_Display_DeviceConfig_Get
|
||||||
|
|
||||||
|
#region ADL_Display_DisplayMapConfig_Get
|
||||||
|
/// <summary> ADL_Display_DisplayMapConfig_Get Delegates</summary>
|
||||||
|
internal static ADL_Display_DisplayMapConfig_Get ADL_Display_DisplayMapConfig_Get
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!ADL_Display_DisplayMapConfig_Get_Check && null == ADL_Display_DisplayMapConfig_Get_)
|
||||||
|
{
|
||||||
|
ADL_Display_DisplayMapConfig_Get_Check = true;
|
||||||
|
if (ADLCheckLibrary.IsFunctionValid("ADL_Display_DisplayMapConfig_Get"))
|
||||||
|
{
|
||||||
|
ADL_Display_DisplayMapConfig_Get_ = ADLImport.ADL_Display_DisplayMapConfig_Get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ADL_Display_DisplayMapConfig_Get_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary> Private Delegate</summary>
|
||||||
|
private static ADL_Display_DisplayMapConfig_Get ADL_Display_DisplayMapConfig_Get_ = null;
|
||||||
|
/// <summary> check flag to indicate the delegate has been checked</summary>
|
||||||
|
private static bool ADL_Display_DisplayMapConfig_Get_Check = false;
|
||||||
|
#endregion ADL_Display_DisplayMapConfig_Get
|
||||||
|
|
||||||
|
#region ADL_Display_DisplayMapConfig_PossibleAddAndRemove
|
||||||
|
/// <summary> ADL_Display_DisplayMapConfig_PossibleAddAndRemove Delegates</summary>
|
||||||
|
internal static ADL_Display_DisplayMapConfig_PossibleAddAndRemove ADL_Display_DisplayMapConfig_PossibleAddAndRemove
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!ADL_Display_DisplayMapConfig_PossibleAddAndRemove_Check && null == ADL_Display_DisplayMapConfig_PossibleAddAndRemove_)
|
||||||
|
{
|
||||||
|
ADL_Display_DisplayMapConfig_PossibleAddAndRemove_Check = true;
|
||||||
|
if (ADLCheckLibrary.IsFunctionValid("ADL_Display_DisplayMapConfig_PossibleAddAndRemove"))
|
||||||
|
{
|
||||||
|
ADL_Display_DisplayMapConfig_PossibleAddAndRemove_ = ADLImport.ADL_Display_DisplayMapConfig_PossibleAddAndRemove;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ADL_Display_DisplayMapConfig_PossibleAddAndRemove_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary> Private Delegate</summary>
|
||||||
|
private static ADL_Display_DisplayMapConfig_PossibleAddAndRemove ADL_Display_DisplayMapConfig_PossibleAddAndRemove_ = null;
|
||||||
|
/// <summary> check flag to indicate the delegate has been checked</summary>
|
||||||
|
private static bool ADL_Display_DisplayMapConfig_PossibleAddAndRemove_Check = false;
|
||||||
|
#endregion ADL_Display_DisplayMapConfig_PossibleAddAndRemove
|
||||||
|
|
||||||
#region ADL_Display_DisplayInfo_Get
|
#region ADL_Display_DisplayInfo_Get
|
||||||
/// <summary> ADL_Display_DisplayInfo_Get Delegates</summary>
|
/// <summary> ADL_Display_DisplayInfo_Get Delegates</summary>
|
||||||
internal static ADL_Display_DisplayInfo_Get ADL_Display_DisplayInfo_Get
|
internal static ADL_Display_DisplayInfo_Get ADL_Display_DisplayInfo_Get
|
||||||
@ -970,6 +1084,7 @@ namespace ATI.ADL
|
|||||||
private static bool ADL_Display_DisplayInfo_Get_Check = false;
|
private static bool ADL_Display_DisplayInfo_Get_Check = false;
|
||||||
#endregion ADL_Display_DisplayInfo_Get
|
#endregion ADL_Display_DisplayInfo_Get
|
||||||
|
|
||||||
|
|
||||||
#region ADL_Display_SLSMapConfig_Get
|
#region ADL_Display_SLSMapConfig_Get
|
||||||
/// <summary> ADL_Display_SLSMapConfig_Get Delegates</summary>
|
/// <summary> ADL_Display_SLSMapConfig_Get Delegates</summary>
|
||||||
internal static ADL_Display_SLSMapConfig_Get ADL_Display_SLSMapConfig_Get
|
internal static ADL_Display_SLSMapConfig_Get ADL_Display_SLSMapConfig_Get
|
||||||
|
@ -112,6 +112,86 @@ namespace DisplayMagicianShared.AMD
|
|||||||
|
|
||||||
List<string> displayIdentifiers = new List<string>();
|
List<string> displayIdentifiers = new List<string>();
|
||||||
|
|
||||||
|
// Keep a list of things we want to track
|
||||||
|
List<ADLDisplayMap> allDisplayMaps = new List<ADLDisplayMap>();
|
||||||
|
List<ADLDisplayTarget> allDisplayTargets = new List<ADLDisplayTarget>();
|
||||||
|
|
||||||
|
if (ADL.ADL_Display_DisplayMapConfig_Get != null)
|
||||||
|
{
|
||||||
|
IntPtr DisplayMapBuffer = IntPtr.Zero;
|
||||||
|
IntPtr DisplayTargetBuffer = IntPtr.Zero;
|
||||||
|
int numDisplayMaps = 0;
|
||||||
|
int numDisplayTargets = 0;
|
||||||
|
|
||||||
|
// Get the DisplayMap info for all adapters on the machine in one go
|
||||||
|
ADLRet = ADL.ADL_Display_DisplayMapConfig_Get(-1, out numDisplayMaps, out DisplayMapBuffer, out numDisplayTargets, out DisplayTargetBuffer, 0);
|
||||||
|
if (ADLRet == ADL.ADL_SUCCESS)
|
||||||
|
{
|
||||||
|
SharedLogger.logger.Trace($"ADLWrapper/GenerateProfileDisplayIdentifiers: Number Of DisplayMaps: {numDisplayMaps.ToString()} ");
|
||||||
|
|
||||||
|
// Marshal the Display Maps
|
||||||
|
ADLDisplayMap oneDisplayMap = new ADLDisplayMap();
|
||||||
|
|
||||||
|
for (int displayMapNum = 0; displayMapNum < numDisplayMaps; displayMapNum++)
|
||||||
|
{
|
||||||
|
// NOTE: the ToInt64 work on 64 bit, need to change to ToInt32 for 32 bit OS
|
||||||
|
oneDisplayMap = (ADLDisplayMap)Marshal.PtrToStructure(new IntPtr(DisplayMapBuffer.ToInt64() + (displayMapNum * Marshal.SizeOf(oneDisplayMap))), oneDisplayMap.GetType());
|
||||||
|
allDisplayMaps.Add(oneDisplayMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Marshall the DisplayTargets
|
||||||
|
ADLDisplayTarget oneDisplayTarget = new ADLDisplayTarget();
|
||||||
|
|
||||||
|
for (int displayTargetNum = 0; displayTargetNum < numDisplayTargets; displayTargetNum++)
|
||||||
|
{
|
||||||
|
// NOTE: the ToInt64 work on 64 bit, need to change to ToInt32 for 32 bit OS
|
||||||
|
oneDisplayTarget = (ADLDisplayTarget)Marshal.PtrToStructure(new IntPtr(DisplayMapBuffer.ToInt64() + (displayTargetNum * Marshal.SizeOf(oneDisplayTarget))), oneDisplayTarget.GetType());
|
||||||
|
allDisplayTargets.Add(oneDisplayTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ADL.ADL_Display_DisplayMapConfig_PossibleAddAndRemove != null)
|
||||||
|
{
|
||||||
|
int numDisplayMap = 1;
|
||||||
|
int numDisplayTarget = 1;
|
||||||
|
|
||||||
|
IntPtr PossibleAddTargetBuffer = IntPtr.Zero;
|
||||||
|
IntPtr PossibleRemoveTargetBuffer = IntPtr.Zero;
|
||||||
|
int numPossibleAddTargets = 0;
|
||||||
|
int numPossibleRemoveTargets = 0;
|
||||||
|
|
||||||
|
List<ADLDisplayTarget> allPossibleAddDisplayTargets = new List<ADLDisplayTarget>();
|
||||||
|
List<ADLDisplayTarget> allPossibleRemoveDisplayTargets = new List<ADLDisplayTarget>();
|
||||||
|
|
||||||
|
// Force the display detection and get the Display Info. Use 0 as last parameter to NOT force detection
|
||||||
|
ADLRet = ADL.ADL_Display_DisplayMapConfig_PossibleAddAndRemove(0, numDisplayMap, allDisplayMaps[0], numDisplayTarget, allDisplayTargets[0], out numPossibleAddTargets, out PossibleAddTargetBuffer, out numPossibleRemoveTargets, out PossibleRemoveTargetBuffer);
|
||||||
|
if (ADLRet == ADL.ADL_SUCCESS)
|
||||||
|
{
|
||||||
|
// Marshal the Possible Add Targets
|
||||||
|
ADLDisplayTarget oneDisplayTarget = new ADLDisplayTarget();
|
||||||
|
|
||||||
|
for (int displayTargetNum = 0; displayTargetNum < numPossibleAddTargets; displayTargetNum++)
|
||||||
|
{
|
||||||
|
// NOTE: the ToInt64 work on 64 bit, need to change to ToInt32 for 32 bit OS
|
||||||
|
oneDisplayTarget = (ADLDisplayTarget)Marshal.PtrToStructure(new IntPtr(PossibleAddTargetBuffer.ToInt64() + (displayTargetNum * Marshal.SizeOf(oneDisplayTarget))), oneDisplayTarget.GetType());
|
||||||
|
allPossibleAddDisplayTargets.Add(oneDisplayTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Marshal the Possible Remove Targets
|
||||||
|
// oneDisplayTarget = new ADLDisplayTarget();
|
||||||
|
|
||||||
|
for (int displayTargetNum = 0; displayTargetNum < numPossibleRemoveTargets; displayTargetNum++)
|
||||||
|
{
|
||||||
|
// NOTE: the ToInt64 work on 64 bit, need to change to ToInt32 for 32 bit OS
|
||||||
|
oneDisplayTarget = (ADLDisplayTarget)Marshal.PtrToStructure(new IntPtr(PossibleRemoveTargetBuffer.ToInt64() + (displayTargetNum * Marshal.SizeOf(oneDisplayTarget))), oneDisplayTarget.GetType());
|
||||||
|
allPossibleAddDisplayTargets.Add(oneDisplayTarget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (null != ADL.ADL_Adapter_NumberOfAdapters_Get)
|
if (null != ADL.ADL_Adapter_NumberOfAdapters_Get)
|
||||||
{
|
{
|
||||||
ADL.ADL_Adapter_NumberOfAdapters_Get(ref NumberOfAdapters);
|
ADL.ADL_Adapter_NumberOfAdapters_Get(ref NumberOfAdapters);
|
||||||
@ -222,7 +302,7 @@ namespace DisplayMagicianShared.AMD
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip connected but non-mapped displays (not mapped in windows)
|
// Skip connected but non-mapped displays (not mapped in windows) - wae want all displays currently visible in the OS
|
||||||
if ((DisplayInfoData[j].DisplayInfoValue & 2) != 2)
|
if ((DisplayInfoData[j].DisplayInfoValue & 2) != 2)
|
||||||
{
|
{
|
||||||
SharedLogger.logger.Trace($"ADLWrapper/GenerateProfileDisplayIdentifiers: AMD Adapter #{i} ({OSAdapterInfoData.ADLAdapterInfo[i].AdapterName}) AdapterID display ID#{j} is not connected");
|
SharedLogger.logger.Trace($"ADLWrapper/GenerateProfileDisplayIdentifiers: AMD Adapter #{i} ({OSAdapterInfoData.ADLAdapterInfo[i].AdapterName}) AdapterID display ID#{j} is not connected");
|
||||||
@ -369,6 +449,7 @@ namespace DisplayMagicianShared.AMD
|
|||||||
|
|
||||||
List<string> displayIdentifiers = new List<string>();
|
List<string> displayIdentifiers = new List<string>();
|
||||||
|
|
||||||
|
|
||||||
if (null != ADL.ADL_Adapter_NumberOfAdapters_Get)
|
if (null != ADL.ADL_Adapter_NumberOfAdapters_Get)
|
||||||
{
|
{
|
||||||
ADL.ADL_Adapter_NumberOfAdapters_Get(ref NumberOfAdapters);
|
ADL.ADL_Adapter_NumberOfAdapters_Get(ref NumberOfAdapters);
|
||||||
@ -472,7 +553,7 @@ namespace DisplayMagicianShared.AMD
|
|||||||
|
|
||||||
for (j = 0; j < NumberOfDisplays; j++)
|
for (j = 0; j < NumberOfDisplays; j++)
|
||||||
{
|
{
|
||||||
// Skip non connected displays
|
// Skip non connected displays - we want only connected displays that could potentially be used now (thats both mapped and non-mapped displays)
|
||||||
if ((DisplayInfoData[j].DisplayInfoValue & 1) != 1)
|
if ((DisplayInfoData[j].DisplayInfoValue & 1) != 1)
|
||||||
{
|
{
|
||||||
SharedLogger.logger.Trace($"ADLWrapper/GenerateProfileDisplayIdentifiers: AMD Adapter #{i} ({OSAdapterInfoData.ADLAdapterInfo[i].AdapterName}) AdapterID display ID#{j} is not connected");
|
SharedLogger.logger.Trace($"ADLWrapper/GenerateProfileDisplayIdentifiers: AMD Adapter #{i} ({OSAdapterInfoData.ADLAdapterInfo[i].AdapterName}) AdapterID display ID#{j} is not connected");
|
||||||
@ -537,8 +618,6 @@ namespace DisplayMagicianShared.AMD
|
|||||||
{
|
{
|
||||||
ADL.ADLConnectionType connector = (ADL.ADLConnectionType)DisplayInfoData[j].DisplayOutputType;
|
ADL.ADLConnectionType connector = (ADL.ADLConnectionType)DisplayInfoData[j].DisplayOutputType;
|
||||||
displayInfoIdentifierSection.Add(connector.ToString());
|
displayInfoIdentifierSection.Add(connector.ToString());
|
||||||
|
|
||||||
ADL.ADLConnectionType connector = (ADL.ADLConnectionType)DisplayInfoData[j].DisplayType;
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user