mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Added ST100 support
Fixed default Overwatch profile only showing Genji colors
This commit is contained in:
1 parent
4f9632294f
commit
7940f4ef33
4 files changed
+94
-10
No files matched your search
@@ -156,8 +156,8 @@
|
|||||||
<Reference Include="CSCore, Version=1.2.1.2, Culture=neutral, PublicKeyToken=5a08f2b6f4415dea, processorArchitecture=MSIL">
|
<Reference Include="CSCore, Version=1.2.1.2, Culture=neutral, PublicKeyToken=5a08f2b6f4415dea, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\CSCore.1.2.1.2\lib\net35-client\CSCore.dll</HintPath>
|
<HintPath>..\packages\CSCore.1.2.1.2\lib\net35-client\CSCore.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="CUE.NET, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="CUE.NET, Version=1.2.0.1, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\CUE.NET.1.2.0\lib\net45\CUE.NET.dll</HintPath>
|
<HintPath>..\packages\CUE.NET.1.2.0.1\lib\net45\CUE.NET.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DynamicExpresso.Core, Version=1.3.4.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="DynamicExpresso.Core, Version=1.3.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\DynamicExpresso.Core.1.3.4.7\lib\net40\DynamicExpresso.Core.dll</HintPath>
|
<HintPath>..\packages\DynamicExpresso.Core.1.3.4.7\lib\net40\DynamicExpresso.Core.dll</HintPath>
|
||||||
@@ -285,6 +285,7 @@
|
|||||||
<Compile Include="DeviceProviders\CoolerMaster\MastermouseProL.cs" />
|
<Compile Include="DeviceProviders\CoolerMaster\MastermouseProL.cs" />
|
||||||
<Compile Include="DeviceProviders\CoolerMaster\MastermouseProS.cs" />
|
<Compile Include="DeviceProviders\CoolerMaster\MastermouseProS.cs" />
|
||||||
<Compile Include="DeviceProviders\CoolerMaster\Utilities\CmSdk.cs" />
|
<Compile Include="DeviceProviders\CoolerMaster\Utilities\CmSdk.cs" />
|
||||||
|
<Compile Include="DeviceProviders\Corsair\CorsairGeneric.cs" />
|
||||||
<Compile Include="DeviceProviders\Corsair\CorsairMouse.cs" />
|
<Compile Include="DeviceProviders\Corsair\CorsairMouse.cs" />
|
||||||
<Compile Include="DeviceProviders\Corsair\CorsairHeadset.cs" />
|
<Compile Include="DeviceProviders\Corsair\CorsairHeadset.cs" />
|
||||||
<Compile Include="DeviceProviders\Corsair\CorsairMousemat.cs" />
|
<Compile Include="DeviceProviders\Corsair\CorsairMousemat.cs" />
|
||||||
@@ -1086,13 +1087,6 @@
|
|||||||
<Folder Include="Resources\Lua\" />
|
<Folder Include="Resources\Lua\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="..\packages\CUE.NET.1.2.0\build\net45\CUE.NET.targets" Condition="Exists('..\packages\CUE.NET.1.2.0\build\net45\CUE.NET.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('..\packages\CUE.NET.1.2.0\build\net45\CUE.NET.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CUE.NET.1.2.0\build\net45\CUE.NET.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>if $(ConfigurationName) == Release (
|
<PostBuildEvent>if $(ConfigurationName) == Release (
|
||||||
attrib +r Artemis.pdb
|
attrib +r Artemis.pdb
|
||||||
@@ -1101,6 +1095,13 @@
|
|||||||
echo Access denied is intended, see post build event
|
echo Access denied is intended, see post build event
|
||||||
)</PostBuildEvent>
|
)</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<Import Project="..\packages\CUE.NET.1.2.0.1\build\net45\CUE.NET.targets" Condition="Exists('..\packages\CUE.NET.1.2.0.1\build\net45\CUE.NET.targets')" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\packages\CUE.NET.1.2.0.1\build\net45\CUE.NET.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CUE.NET.1.2.0.1\build\net45\CUE.NET.targets'))" />
|
||||||
|
</Target>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Threading;
|
||||||
|
using Artemis.DeviceProviders.Corsair.Utilities;
|
||||||
|
using CUE.NET;
|
||||||
|
using CUE.NET.Brushes;
|
||||||
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
|
using Ninject.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace Artemis.DeviceProviders.Corsair
|
||||||
|
{
|
||||||
|
public class CorsairGeneric : DeviceProvider
|
||||||
|
{
|
||||||
|
private readonly ImageBrush _genericBrush;
|
||||||
|
|
||||||
|
public CorsairGeneric(ILogger logger)
|
||||||
|
{
|
||||||
|
Logger = logger;
|
||||||
|
Type = DeviceType.Generic;
|
||||||
|
_genericBrush = new ImageBrush();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ILogger Logger { get; set; }
|
||||||
|
|
||||||
|
public override bool TryEnable()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (CorsairUtilities.SDKLock)
|
||||||
|
{
|
||||||
|
CanUse = CanInitializeSdk();
|
||||||
|
if (CanUse && !CueSDK.IsInitialized)
|
||||||
|
CueSDK.Initialize(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
CanUse = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.Debug("Attempted to enable Corsair generic devices. CanUse: {0}", CanUse);
|
||||||
|
|
||||||
|
if (CanUse)
|
||||||
|
{
|
||||||
|
CueSDK.UpdateMode = UpdateMode.Manual;
|
||||||
|
CueSDK.HeadsetStandSDK.Brush = _genericBrush;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CanUse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Disable()
|
||||||
|
{
|
||||||
|
throw new NotSupportedException("Can only disable a keyboard");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateDevice(Bitmap bitmap)
|
||||||
|
{
|
||||||
|
if (!CanUse || bitmap == null)
|
||||||
|
return;
|
||||||
|
if (bitmap.Width != bitmap.Height)
|
||||||
|
throw new ArgumentException("Bitmap must be a perfect square");
|
||||||
|
|
||||||
|
_genericBrush.Image = bitmap;
|
||||||
|
CueSDK.HeadsetStandSDK.Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool CanInitializeSdk()
|
||||||
|
{
|
||||||
|
// This will skip the check-loop if the SDK is initialized
|
||||||
|
if (CueSDK.IsInitialized)
|
||||||
|
return CueSDK.IsSDKAvailable(CorsairDeviceType.HeadsetStand);
|
||||||
|
|
||||||
|
for (var tries = 0; tries < 9; tries++)
|
||||||
|
{
|
||||||
|
if (CueSDK.IsSDKAvailable(CorsairDeviceType.HeadsetStand))
|
||||||
|
return true;
|
||||||
|
Thread.Sleep(2000);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -5,7 +5,7 @@
|
|||||||
<package id="Caliburn.Micro.Core" version="3.2.0" targetFramework="net461" />
|
<package id="Caliburn.Micro.Core" version="3.2.0" targetFramework="net461" />
|
||||||
<package id="Colore" version="5.2.0" targetFramework="net461" />
|
<package id="Colore" version="5.2.0" targetFramework="net461" />
|
||||||
<package id="CSCore" version="1.2.1.2" targetFramework="net461" />
|
<package id="CSCore" version="1.2.1.2" targetFramework="net461" />
|
||||||
<package id="CUE.NET" version="1.2.0" targetFramework="net461" />
|
<package id="CUE.NET" version="1.2.0.1" targetFramework="net461" />
|
||||||
<package id="DynamicExpresso.Core" version="1.3.4.7" targetFramework="net461" />
|
<package id="DynamicExpresso.Core" version="1.3.4.7" targetFramework="net461" />
|
||||||
<package id="gong-wpf-dragdrop" version="0.1.4.3" targetFramework="net461" />
|
<package id="gong-wpf-dragdrop" version="0.1.4.3" targetFramework="net461" />
|
||||||
<package id="Hardcodet.NotifyIcon.Wpf" version="1.0.8" targetFramework="net452" />
|
<package id="Hardcodet.NotifyIcon.Wpf" version="1.0.8" targetFramework="net452" />
|
||||||
|
|||||||
Reference in new issue
Block a user