mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Added smoothing to default Windows profile
Added default easing values Fixed Logitech DLL restore on startup Bumped version number
This commit is contained in:
parent
118d4b2df2
commit
1ee6678448
@ -324,9 +324,9 @@
|
||||
<Compile Include="DeviceProviders\CoolerMaster\MasterkeysProL.cs" />
|
||||
<Compile Include="DeviceProviders\CoolerMaster\MasterkeysProS.cs" />
|
||||
<Compile Include="DeviceProviders\CoolerMaster\Utilities\CmSdk.cs" />
|
||||
<Compile Include="DeviceProviders\Corsair\CorsairMice.cs" />
|
||||
<Compile Include="DeviceProviders\Corsair\CorsairHeadsets.cs" />
|
||||
<Compile Include="DeviceProviders\Corsair\CorsairMousemats.cs" />
|
||||
<Compile Include="DeviceProviders\Corsair\CorsairMouse.cs" />
|
||||
<Compile Include="DeviceProviders\Corsair\CorsairHeadset.cs" />
|
||||
<Compile Include="DeviceProviders\Corsair\CorsairMousemat.cs" />
|
||||
<Compile Include="DeviceProviders\Corsair\Utilities\KeyMap.cs" />
|
||||
<Compile Include="DeviceProviders\DeviceProvider.cs" />
|
||||
<Compile Include="DeviceProviders\Logitech\G810.cs" />
|
||||
@ -344,7 +344,7 @@
|
||||
<Compile Include="InjectionModules\EffectModules.cs" />
|
||||
<Compile Include="InjectionModules\ProfileModules.cs" />
|
||||
<Compile Include="ItemBehaviours\BindableSelectedItemBehavior.cs" />
|
||||
<Compile Include="DeviceProviders\Corsair\CorsairKeyboards.cs" />
|
||||
<Compile Include="DeviceProviders\Corsair\CorsairKeyboard.cs" />
|
||||
<Compile Include="DeviceProviders\KeyboardProvider.cs" />
|
||||
<Compile Include="DeviceProviders\Logitech\G910.cs" />
|
||||
<Compile Include="DeviceProviders\Logitech\Utilities\KeyboardNames.cs" />
|
||||
|
||||
@ -8,6 +8,7 @@ using Artemis.InjectionModules;
|
||||
using Artemis.Settings;
|
||||
using Artemis.Utilities;
|
||||
using Artemis.Utilities.Converters;
|
||||
using Artemis.Utilities.DataReaders;
|
||||
using Artemis.ViewModels;
|
||||
using Caliburn.Micro;
|
||||
using Newtonsoft.Json;
|
||||
@ -23,6 +24,8 @@ namespace Artemis
|
||||
{
|
||||
// Start logging before anything else
|
||||
Logging.SetupLogging(SettingsProvider.Load<GeneralSettings>().LogLevel);
|
||||
// Restore DDLs before interacting with any SDKs
|
||||
DllManager.RestoreLogitechDll();
|
||||
|
||||
Initialize();
|
||||
BindSpecialValues();
|
||||
|
||||
@ -8,9 +8,9 @@ using Ninject.Extensions.Logging;
|
||||
|
||||
namespace Artemis.DeviceProviders.Corsair
|
||||
{
|
||||
internal class CorsairHeadsets : DeviceProvider
|
||||
internal class CorsairHeadset : DeviceProvider
|
||||
{
|
||||
public CorsairHeadsets(ILogger logger)
|
||||
public CorsairHeadset(ILogger logger)
|
||||
{
|
||||
Logger = logger;
|
||||
Type = DeviceType.Headset;
|
||||
@ -10,19 +10,18 @@ using CUE.NET;
|
||||
using CUE.NET.Brushes;
|
||||
using CUE.NET.Devices.Generic;
|
||||
using CUE.NET.Devices.Generic.Enums;
|
||||
using CUE.NET.Devices.Keyboard;
|
||||
using CUE.NET.Helper;
|
||||
using Ninject.Extensions.Logging;
|
||||
using Point = System.Drawing.Point;
|
||||
|
||||
namespace Artemis.DeviceProviders.Corsair
|
||||
{
|
||||
public class CorsairKeyboards : KeyboardProvider
|
||||
public class CorsairKeyboard : KeyboardProvider
|
||||
{
|
||||
private CorsairKeyboard _keyboard;
|
||||
private CUE.NET.Devices.Keyboard.CorsairKeyboard _keyboard;
|
||||
private ImageBrush _keyboardBrush;
|
||||
|
||||
public CorsairKeyboards(ILogger logger)
|
||||
public CorsairKeyboard(ILogger logger)
|
||||
{
|
||||
Logger = logger;
|
||||
Name = "Corsair RGB Keyboards";
|
||||
@ -83,7 +82,6 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
}
|
||||
|
||||
Logger.Debug("Corsair SDK reported device as: {0}", _keyboard.DeviceInfo.Model);
|
||||
|
||||
_keyboard.Brush = _keyboardBrush ?? (_keyboardBrush = new ImageBrush());
|
||||
}
|
||||
|
||||
@ -8,9 +8,9 @@ using Ninject.Extensions.Logging;
|
||||
|
||||
namespace Artemis.DeviceProviders.Corsair
|
||||
{
|
||||
internal class CorsairMice : DeviceProvider
|
||||
internal class CorsairMouse : DeviceProvider
|
||||
{
|
||||
public CorsairMice(ILogger logger)
|
||||
public CorsairMouse(ILogger logger)
|
||||
{
|
||||
Logger = logger;
|
||||
Type = DeviceType.Mouse;
|
||||
@ -4,14 +4,13 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using CUE.NET;
|
||||
using CUE.NET.Devices.Generic.Enums;
|
||||
using CUE.NET.Devices.Mousemat.Enums;
|
||||
using Ninject.Extensions.Logging;
|
||||
|
||||
namespace Artemis.DeviceProviders.Corsair
|
||||
{
|
||||
internal class CorsairMousemats : DeviceProvider
|
||||
internal class CorsairMousemat : DeviceProvider
|
||||
{
|
||||
public CorsairMousemats(ILogger logger)
|
||||
public CorsairMousemat(ILogger logger)
|
||||
{
|
||||
Logger = logger;
|
||||
Type = DeviceType.Mousemat;
|
||||
@ -40,7 +39,7 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
|
||||
public override void UpdateDevice(Bitmap bitmap)
|
||||
{
|
||||
if (!CanUse || bitmap == null)
|
||||
if (!CanUse || (bitmap == null))
|
||||
return;
|
||||
if (bitmap.Width != bitmap.Height)
|
||||
throw new ArgumentException("Bitmap must be a perfect square");
|
||||
@ -1,6 +1,5 @@
|
||||
using System.Drawing;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using Artemis.DeviceProviders.Logitech.Utilities;
|
||||
using Artemis.Utilities.DataReaders;
|
||||
using Microsoft.Win32;
|
||||
@ -23,8 +22,17 @@ namespace Artemis.DeviceProviders.Logitech
|
||||
return false;
|
||||
}
|
||||
|
||||
if (DllManager.RestoreLogitechDll())
|
||||
RestoreDll();
|
||||
if (DllManager.DllPlaced())
|
||||
{
|
||||
CantEnableText =
|
||||
"Artemis couldn't enable your Logitech keyboard, because the required files are not in place.\n\n" +
|
||||
"This happens when you run The Division or GTA and shut down Artemis before shutting down The Division\n" +
|
||||
"Artemis tries to fix this automatically on startup but because the files may have been in use it failed.\n\n" +
|
||||
"To try again, restart Artemis or check out the FAQ.";
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int majorNum = 0, minorNum = 0, buildNum = 0;
|
||||
|
||||
LogitechGSDK.LogiLedInit();
|
||||
@ -42,15 +50,6 @@ namespace Artemis.DeviceProviders.Logitech
|
||||
return version >= 88115;
|
||||
}
|
||||
|
||||
private void RestoreDll()
|
||||
{
|
||||
MessageBox.Show(
|
||||
"Artemis couldn't enable your Logitech keyboard, because the required files are not in place.\n\n" +
|
||||
"This happens when you run The Division and shut down Artemis before shutting down The Division\n" +
|
||||
"It can be fixed automatically by clicking OK, but to avoid this message in the future please\n" +
|
||||
"shut down The Division before shutting down Artemis.");
|
||||
}
|
||||
|
||||
public override void Enable()
|
||||
{
|
||||
// Initialize the SDK
|
||||
|
||||
@ -12,7 +12,7 @@ namespace Artemis.InjectionModules
|
||||
public override void Load()
|
||||
{
|
||||
// Keyboards
|
||||
Bind<DeviceProvider>().To<CorsairKeyboards>().InSingletonScope();
|
||||
Bind<DeviceProvider>().To<CorsairKeyboard>().InSingletonScope();
|
||||
Bind<DeviceProvider>().To<G910>().InSingletonScope();
|
||||
Bind<DeviceProvider>().To<G810>().InSingletonScope();
|
||||
Bind<DeviceProvider>().To<BlackWidow>().InSingletonScope();
|
||||
@ -20,13 +20,13 @@ namespace Artemis.InjectionModules
|
||||
Bind<DeviceProvider>().To<MasterkeysProS>().InSingletonScope();
|
||||
|
||||
// Mice
|
||||
Bind<DeviceProvider>().To<CorsairMice>().InSingletonScope();
|
||||
Bind<DeviceProvider>().To<CorsairMouse>().InSingletonScope();
|
||||
|
||||
// Headsets
|
||||
Bind<DeviceProvider>().To<CorsairHeadsets>().InSingletonScope();
|
||||
Bind<DeviceProvider>().To<CorsairHeadset>().InSingletonScope();
|
||||
|
||||
// Mousemats
|
||||
Bind<DeviceProvider>().To<CorsairMousemats>().InSingletonScope();
|
||||
Bind<DeviceProvider>().To<CorsairMousemat>().InSingletonScope();
|
||||
|
||||
// Other
|
||||
Bind<DeviceProvider>().To<LogitechGeneric>().InSingletonScope();
|
||||
|
||||
@ -28,6 +28,7 @@ namespace Artemis.Profiles.Layers.Models
|
||||
|
||||
[JsonIgnore]
|
||||
public ImageSource LayerImage => LayerType.DrawThumbnail(this);
|
||||
|
||||
[JsonIgnore]
|
||||
public TweenModel TweenModel { get; set; }
|
||||
|
||||
@ -176,7 +177,13 @@ namespace Artemis.Profiles.Layers.Models
|
||||
Width = 1,
|
||||
X = 0,
|
||||
Y = 0,
|
||||
Opacity = 1
|
||||
Opacity = 1,
|
||||
HeightEaseTime = 0,
|
||||
HeightEase = "Linear",
|
||||
WidthEaseTime = 0,
|
||||
WidthEase = "Linear",
|
||||
OpacityEaseTime = 0,
|
||||
OpacityEase = "Linear"
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -236,7 +243,7 @@ namespace Artemis.Profiles.Layers.Models
|
||||
if (height < 0)
|
||||
height = 0;
|
||||
|
||||
return new Rect(X * scale, Y * scale, width * scale, height * scale);
|
||||
return new Rect(X*scale, Y*scale, width*scale, height*scale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -53,7 +53,7 @@ using System.Windows;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.5.0.4")]
|
||||
[assembly: AssemblyFileVersion("1.5.0.4")]
|
||||
[assembly: AssemblyVersion("1.6.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.0.0")]
|
||||
[assembly: InternalsVisibleTo("Artemis.Explorables")]
|
||||
|
||||
|
||||
Binary file not shown.
@ -33,7 +33,7 @@ namespace Artemis.Utilities.DataReaders
|
||||
|
||||
public static bool RestoreLogitechDll()
|
||||
{
|
||||
if (!File.Exists(LogitechPath + @"\LogitechLed.dll") || !File.Exists(LogitechPath + @"\artemis.txt"))
|
||||
if (!DllPlaced())
|
||||
return false;
|
||||
|
||||
try
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user