コード例 #1
0
        private bool GetOD8InitSetting(int adapterIndex, out ADLOD8InitSetting odInitSetting)
        {
            odInitSetting = ADLOD8InitSetting.Create();
            try {
                var r = AdlNativeMethods.ADL2_Overdrive8_Init_Setting_Get(_context, adapterIndex, ref odInitSetting);
                if (r < AdlStatus.ADL_OK)
                {
                    NTMinerConsole.DevError(() => $"{nameof(AdlNativeMethods.ADL2_Overdrive8_Init_Setting_Get)} {r.ToString()}");
                }
#if DEBUG
                Logger.Debug($"od8initSettingList={VirtualRoot.JsonSerializer.Serialize(odInitSetting)}");
#endif
                return(r == AdlStatus.ADL_OK);
            }
            catch (Exception ex) {
                Logger.ErrorDebugLine(ex);
                return(false);
            }
        }