Fixed G910 and G810 alignment issues
Bumped version number
This commit is contained in:
SpoinkyNL committed 2018-01-08 11:52:13 +01:00
1 parent 52cdb52ecc
commit ccd63abe9a
5 files changed
+38 -27

No files matched your search

@@ -2,6 +2,9 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment> <Fragment>
<DirectoryRef Id="INSTALLFOLDER"> <DirectoryRef Id="INSTALLFOLDER">
<Component Id="cmp378A752E2F224E90D883D53E28337CAE" Guid="*">
<File Id="fil7C034637F4B3C3E93ACB9990B3AE25CE" KeyPath="yes" Source="$(var.HarvestPath)\artemis-1.11.1.0.zip" />
</Component>
<Component Id="cmp9B04FAC2BF56F13B71858D3F9539F8FE" Guid="*"> <Component Id="cmp9B04FAC2BF56F13B71858D3F9539F8FE" Guid="*">
<File Id="filD726820CC88B0C2D4EF316CD550D5B65" KeyPath="yes" Source="$(var.HarvestPath)\Artemis.exe" /> <File Id="filD726820CC88B0C2D4EF316CD550D5B65" KeyPath="yes" Source="$(var.HarvestPath)\Artemis.exe" />
</Component> </Component>
@@ -210,6 +213,7 @@
</Fragment> </Fragment>
<Fragment> <Fragment>
<ComponentGroup Id="HeatGenerated"> <ComponentGroup Id="HeatGenerated">
<ComponentRef Id="cmp378A752E2F224E90D883D53E28337CAE" />
<ComponentRef Id="cmp9B04FAC2BF56F13B71858D3F9539F8FE" /> <ComponentRef Id="cmp9B04FAC2BF56F13B71858D3F9539F8FE" />
<ComponentRef Id="cmp84F8E8E529BEF2230424503D7A54F566" /> <ComponentRef Id="cmp84F8E8E529BEF2230424503D7A54F566" />
<ComponentRef Id="cmp98E421B03991EBFA9D74DA1DE5FDCEB4" /> <ComponentRef Id="cmp98E421B03991EBFA9D74DA1DE5FDCEB4" />
+1 -1
View File
@@ -2,7 +2,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" Name="Artemis" Language="1033" Version="1.11.0.0" Manufacturer="SpoinkyNL" UpgradeCode="ebc7bc50-0473-4729-8de8-32ddb99bb986"> <Product Id="*" Name="Artemis" Language="1033" Version="1.11.2.0" Manufacturer="SpoinkyNL" UpgradeCode="ebc7bc50-0473-4729-8de8-32ddb99bb986">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" /> <MediaTemplate EmbedCab="yes" />
@@ -28,28 +28,31 @@ namespace Artemis.DeviceProviders.Logitech
} }
/// <summary> /// <summary>
/// The G910 also updates the G-logo, G-badge and G-keys /// The 8910 also updates the G-logo and G-badge
/// </summary> /// </summary>
/// <param name="bitmap"></param> /// <param name="bitmap"></param>
public override void DrawBitmap(Bitmap bitmap) public override void DrawBitmap(Bitmap bitmap)
{ {
using (var croppedBitmap = new Bitmap(21 * 4, 6 * 4)) // Base all actions on a downscaled bitmap since the bitmap is received upscaled
using (var resized = OrionUtilities.ResizeImage(bitmap, Width, Height))
{ {
// Deal with non-standard DPI // Deal with non-standard DPI
croppedBitmap.SetResolution(96, 96); resized.SetResolution(96, 96);
// Don't forget that the image is upscaled 4 times
using (var g = Graphics.FromImage(croppedBitmap)) // LogiLedSetLightingFromBitmap doesn't include the special keys so cut the supported keys out of
// the received bitmap and send them to the SDK as a whole
using (var croppedBitmap = new Bitmap(Width - 1, Height - 1))
{ {
g.DrawImage(bitmap, new Rectangle(0, 0, 84, 24), new Rectangle(4, 4, 84, 24), GraphicsUnit.Pixel); croppedBitmap.SetResolution(96, 96);
using (var g = Graphics.FromImage(croppedBitmap))
{
g.DrawImage(resized, new Rectangle(0, 0, Width - 1, Height - 1), new Rectangle(1, 1, Width - 1, Height - 1), GraphicsUnit.Pixel);
}
LogitechGSDK.LogiLedSetTargetDevice(LogitechGSDK.LOGI_DEVICETYPE_PERKEY_RGB);
LogitechGSDK.LogiLedSetLightingFromBitmap(OrionUtilities.BitmapToByteArray(croppedBitmap));
} }
LogitechGSDK.LogiLedSetTargetDevice(LogitechGSDK.LOGI_DEVICETYPE_PERKEY_RGB);
// TODO: Remapping
LogitechGSDK.LogiLedSetLightingFromBitmap(OrionUtilities.BitmapToByteArray(bitmap));
}
using (var resized = OrionUtilities.ResizeImage(bitmap, 21, 7))
{
// Color G-logo, lets also try some other values to see what happens // Color G-logo, lets also try some other values to see what happens
SetLogitechColorFromCoordinates(resized, KeyboardNames.G_LOGO, 0, 0); SetLogitechColorFromCoordinates(resized, KeyboardNames.G_LOGO, 0, 0);
SetLogitechColorFromCoordinates(resized, KeyboardNames.G_BADGE, 0, 0); SetLogitechColorFromCoordinates(resized, KeyboardNames.G_BADGE, 0, 0);
@@ -54,22 +54,26 @@ namespace Artemis.DeviceProviders.Logitech
/// <param name="bitmap"></param> /// <param name="bitmap"></param>
public override void DrawBitmap(Bitmap bitmap) public override void DrawBitmap(Bitmap bitmap)
{ {
using (var croppedBitmap = new Bitmap(21 * 4, 6 * 4)) // Base all actions on a downscaled bitmap since the bitmap is received upscaled
using (var resized = OrionUtilities.ResizeImage(bitmap, Width, Height))
{ {
// Deal with non-standard DPI // Deal with non-standard DPI
croppedBitmap.SetResolution(96, 96); resized.SetResolution(96, 96);
// Don't forget that the image is upscaled 4 times
using (var g = Graphics.FromImage(croppedBitmap)) // LogiLedSetLightingFromBitmap doesn't include the special keys so cut the supported keys out of
// the received bitmap and send them to the SDK as a whole
using (var croppedBitmap = new Bitmap(Width - 1, Height - 1))
{ {
g.DrawImage(bitmap, new Rectangle(0, 0, 84, 24), new Rectangle(4, 4, 84, 24), GraphicsUnit.Pixel); croppedBitmap.SetResolution(96, 96);
using (var g = Graphics.FromImage(croppedBitmap))
{
g.DrawImage(resized, new Rectangle(0, 0, Width-1, Height-1), new Rectangle(1, 1, Width - 1, Height - 1), GraphicsUnit.Pixel);
}
LogitechGSDK.LogiLedSetTargetDevice(LogitechGSDK.LOGI_DEVICETYPE_PERKEY_RGB);
LogitechGSDK.LogiLedSetLightingFromBitmap(OrionUtilities.BitmapToByteArray(croppedBitmap, G910Keymappings));
} }
LogitechGSDK.LogiLedSetTargetDevice(LogitechGSDK.LOGI_DEVICETYPE_PERKEY_RGB);
LogitechGSDK.LogiLedSetLightingFromBitmap(OrionUtilities.BitmapToByteArray(bitmap, G910Keymappings));
}
using (var resized = OrionUtilities.ResizeImage(bitmap, 22, 7))
{
// Color the extra keys on the left side of the keyboard // Color the extra keys on the left side of the keyboard
SetLogitechColorFromCoordinates(resized, KeyboardNames.G_LOGO, 0, 1); SetLogitechColorFromCoordinates(resized, KeyboardNames.G_LOGO, 0, 1);
SetLogitechColorFromCoordinates(resized, KeyboardNames.G_1, 0, 2); SetLogitechColorFromCoordinates(resized, KeyboardNames.G_1, 0, 2);
+2 -2
View File
@@ -53,6 +53,6 @@ using System.Windows;
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.11.1.0")] [assembly: AssemblyVersion("1.11.2.0")]
[assembly: AssemblyFileVersion("1.11.1.0")] [assembly: AssemblyFileVersion("1.11.2.0")]
[assembly: InternalsVisibleTo("Artemis.Explorables")] [assembly: InternalsVisibleTo("Artemis.Explorables")]