mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
10 Commits
v0.153
...
slash_ligh
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f326fa99cc | ||
|
|
ab44dbf2b4 | ||
|
|
6e88cd2304 | ||
|
|
7639950843 | ||
|
|
c4cd7748f6 | ||
|
|
1adec8b6c9 | ||
|
|
ae298873ca | ||
|
|
773a5899d1 | ||
|
|
72888401b9 | ||
|
|
6a44c42cbf |
@@ -30,7 +30,7 @@ public static class Logger
|
||||
try
|
||||
{
|
||||
var file = File.ReadAllLines(logFile);
|
||||
int skip = Math.Max(0, file.Count() - 2000);
|
||||
int skip = Math.Max(0, file.Count() - 1000);
|
||||
File.WriteAllLines(logFile, file.Skip(skip).ToArray());
|
||||
}
|
||||
catch { }
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace GHelper.Input
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine($"Listener exited: {ex.Message}");
|
||||
Logger.WriteLine(ex.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -90,24 +90,18 @@ public static class AsusHid
|
||||
if (devices is null) return;
|
||||
|
||||
foreach (var device in devices)
|
||||
try
|
||||
{
|
||||
using (var stream = device.Open())
|
||||
foreach (var data in dataList)
|
||||
try
|
||||
{
|
||||
stream.Write(data);
|
||||
Logger.WriteLine($"{log} {device.ProductID.ToString("X")}: {BitConverter.ToString(data)}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine($"Error writing {log} {device.ProductID.ToString("X")}: {ex.Message} {BitConverter.ToString(data)} ");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine($"Error opening {log} {device.ProductID.ToString("X")}: {ex.Message}");
|
||||
}
|
||||
using (var stream = device.Open())
|
||||
foreach (var data in dataList)
|
||||
try
|
||||
{
|
||||
stream.Write(data);
|
||||
Logger.WriteLine($"{log} {device.ProductID.ToString("X")}: {BitConverter.ToString(data)}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine($"Error writing {log} {device.ProductID.ToString("X")}: {ex.Message} {BitConverter.ToString(data)} ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void WriteAura(byte[] data)
|
||||
|
||||
Reference in New Issue
Block a user