Skip to content

Commit

Permalink
temporarily disabled AMD code because of static imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Maassoft committed Nov 22, 2020
1 parent aa371d7 commit 0c5d3b4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 29 deletions.
2 changes: 0 additions & 2 deletions ColorControl/ADLWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace ColorControl
{
Expand Down
25 changes: 12 additions & 13 deletions ColorControl/AmdService.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using ATI.ADL;
using NvAPIWrapper.Display;
//using ATI.ADL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;

namespace ColorControl
{
Expand Down Expand Up @@ -81,7 +78,7 @@ public bool SetRefreshRate(uint refreshRate)
var vertical = 2160;
var display = GetCurrentDisplay();

ADLWrapper.GetDisplayResolution(display, ref horizontal, ref vertical);
//ADLWrapper.GetDisplayResolution(display, ref horizontal, ref vertical);

return SetRefreshRateInternal(display, refreshRate, portrait, horizontal, vertical);
}
Expand All @@ -98,7 +95,7 @@ public List<uint> GetAvailableRefreshRates(AmdPreset preset = null)
var vertical = 2160;
var display = GetCurrentDisplay();

ADLWrapper.GetDisplayResolution(display, ref horizontal, ref vertical);
//ADLWrapper.GetDisplayResolution(display, ref horizontal, ref vertical);

return GetAvailableRefreshRatesInternal(display, portrait, horizontal, vertical);
}
Expand All @@ -112,22 +109,24 @@ public bool IsHDREnabled()
return false;
}

public List<ADLDisplayInfo> GetDisplays()
public List<string> GetDisplays()
{
return ADLWrapper.GetAllDisplays();
//return ADLWrapper.GetAllDisplays();
return null;
}

protected override void Initialize()
{
if (!ADLWrapper.Initialize())
{
throw new InvalidOperationException("Cannot load AMD API");
}
//if (!ADLWrapper.Initialize())
//{
// throw new InvalidOperationException("Cannot load AMD API");
//}
throw new InvalidOperationException("Cannot load AMD API");
}

protected override void Uninitialize()
{
ADLWrapper.Uninitialze();
//ADLWrapper.Uninitialze();
}
}
}
4 changes: 1 addition & 3 deletions ColorControl/ColorControl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<ProductName>ColorControl</ProductName>
<PublisherName>Maassoft</PublisherName>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.3.2.0</ApplicationVersion>
<ApplicationVersion>1.3.3.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
Expand Down Expand Up @@ -172,8 +172,6 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="ADL.cs" />
<Compile Include="ADLWrapper.cs" />
<Compile Include="GraphicsService.cs" />
<Compile Include="AmdService.cs" />
<Compile Include="AmdPreset.cs" />
Expand Down
19 changes: 10 additions & 9 deletions ColorControl/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,16 @@ public MainForm(StartUpParams startUpParams)
_nvPresetsFilename = Path.Combine(_dataDir, "NvPresets.json");
FillNvPresets();

try
{
_amdService = new AmdService();
lblErrorAMD.Text = "If you see this message, it means you have AMD graphics drivers installed. Unfortunately, this feature is not completed yet. If I get an AMD card I might finish it.";
}
catch (Exception)
{
tcMain.TabPages.Remove(tabAMD);
}
//try
//{
// _amdService = new AmdService();
// lblErrorAMD.Text = "If you see this message, it means you have AMD graphics drivers installed. Unfortunately, this feature is not completed yet. If I get an AMD card I might finish it.";
//}
//catch (Exception)
//{
// tcMain.TabPages.Remove(tabAMD);
//}
tcMain.TabPages.Remove(tabAMD);

_lgPresetsFilename = Path.Combine(_dataDir, "LgPresets.json");
var toCopy = Path.Combine(Directory.GetCurrentDirectory(), "LgPresets.json");
Expand Down
4 changes: 2 additions & 2 deletions ColorControl/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.2.0")]
[assembly: AssemblyFileVersion("1.3.2.0")]
[assembly: AssemblyVersion("1.3.3.0")]
[assembly: AssemblyFileVersion("1.3.3.0")]

0 comments on commit 0c5d3b4

Please sign in to comment.