1.1 --- a/Hardware/ATI/ADL.cs Fri Jan 29 21:14:23 2010 +0000
1.2 +++ b/Hardware/ATI/ADL.cs Fri Jan 29 21:58:31 2010 +0000
1.3 @@ -137,6 +137,8 @@
1.4 ref int numAdapters);
1.5 public delegate int ADL_Adapter_ID_GetDelegate(int adapterIndex,
1.6 out int adapterID);
1.7 + public delegate int ADL_Display_AdapterID_GetDelegate(int adapterIndex,
1.8 + out int adapterID);
1.9 public delegate int ADL_Adapter_Active_GetDelegate(int adapterIndex,
1.10 out int status);
1.11 public delegate int ADL_Overdrive5_CurrentActivity_GetDelegate(
1.12 @@ -154,13 +156,15 @@
1.13 private static ADL_Adapter_AdapterInfo_GetDelegate
1.14 _ADL_Adapter_AdapterInfo_Get;
1.15
1.16 - public static ADL_Main_Control_DestroyDelegate
1.17 + public static ADL_Main_Control_DestroyDelegate
1.18 ADL_Main_Control_Destroy;
1.19 public static ADL_Adapter_NumberOfAdapters_GetDelegate
1.20 ADL_Adapter_NumberOfAdapters_Get;
1.21 - public static ADL_Adapter_ID_GetDelegate
1.22 - ADL_Adapter_ID_Get;
1.23 - public static ADL_Adapter_Active_GetDelegate
1.24 + public static ADL_Adapter_ID_GetDelegate
1.25 + _ADL_Adapter_ID_Get;
1.26 + public static ADL_Display_AdapterID_GetDelegate
1.27 + _ADL_Display_AdapterID_Get;
1.28 + public static ADL_Adapter_Active_GetDelegate
1.29 ADL_Adapter_Active_Get;
1.30 public static ADL_Overdrive5_CurrentActivity_GetDelegate
1.31 ADL_Overdrive5_CurrentActivity_Get;
1.32 @@ -199,7 +203,9 @@
1.33 GetDelegate("ADL_Adapter_NumberOfAdapters_Get",
1.34 out ADL_Adapter_NumberOfAdapters_Get);
1.35 GetDelegate("ADL_Adapter_ID_Get",
1.36 - out ADL_Adapter_ID_Get);
1.37 + out _ADL_Adapter_ID_Get);
1.38 + GetDelegate("ADL_Display_AdapterID_Get",
1.39 + out _ADL_Display_AdapterID_Get);
1.40 GetDelegate("ADL_Adapter_Active_Get",
1.41 out ADL_Adapter_Active_Get);
1.42 GetDelegate("ADL_Overdrive5_CurrentActivity_Get",
1.43 @@ -242,6 +248,20 @@
1.44 return result;
1.45 }
1.46
1.47 + public static int ADL_Adapter_ID_Get(int adapterIndex,
1.48 + out int adapterID) {
1.49 + try {
1.50 + return _ADL_Adapter_ID_Get(adapterIndex, out adapterID);
1.51 + } catch (EntryPointNotFoundException) {
1.52 + try {
1.53 + return _ADL_Display_AdapterID_Get(adapterIndex, out adapterID);
1.54 + } catch (EntryPointNotFoundException) {
1.55 + adapterID = 1;
1.56 + return ADL_OK;
1.57 + }
1.58 + }
1.59 + }
1.60 +
1.61 private delegate IntPtr ADL_Main_Memory_AllocDelegate(int size);
1.62
1.63 private static IntPtr Main_Memory_Alloc(int size) {