Skip to content

Commit 20d62bd

Browse files
committed
Extra razer process checks
1 parent c696bbf commit 20d62bd

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

Aimmy2/AILogic/AIManager.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using System.Drawing.Imaging;
1313
using System.IO;
1414
using System.Windows;
15-
using System.Windows.Threading;
1615
using Visuality;
1716
using Vortice.Direct3D;
1817
using Vortice.Direct3D11;
@@ -180,7 +179,7 @@ private async Task LoadModelAsync(SessionOptions sessionOptions, string modelPat
180179
{
181180
try
182181
{
183-
if (useCUDA) { sessionOptions.AppendExecutionProvider_CUDA(0); } // Using GPU 0, task manager will tell you which GPU is being used in the "Performance" tab
182+
if (useCUDA) { sessionOptions.AppendExecutionProvider_CUDA(); } // Using GPU 0, task manager will tell you which GPU is which (0,1,2, etc) in the "Performance" tab
184183
else
185184
{
186185
sessionOptions.AppendExecutionProvider_Tensorrt();

Aimmy2/MouseMovementLibraries/RazerSupport/RZMouse.cs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,24 @@ public static bool CheckForRazerDevices()
4040
return Razer_HID.Count != 0;
4141
}
4242

43+
private static readonly string[] RazerSynapseProcesses =
44+
{
45+
"RazerAppEngine",
46+
"Razer Synapse",
47+
"Razer Synapse Beta",
48+
"Razer Synapse 3",
49+
"Razer Synapse 3 Beta"
50+
};
51+
private static bool IsRazerSynapseRunning()
52+
{
53+
return RazerSynapseProcesses.Any(processName => Process.GetProcessesByName(processName).Any());
54+
}
4355
public static async Task<bool> CheckRazerSynapseInstall() // returns true if running/installed and false if not installed/running
4456
{
45-
bool isSynapseRunning = Process.GetProcessesByName("RazerAppEngine").Any();
46-
47-
if (isSynapseRunning) return true;
57+
if (IsRazerSynapseRunning()) return true;
4858

49-
var result = MessageBox.Show("Razer Synapse is not running, do you have it installed?",
59+
var result = MessageBox.Show("Razer Synapse is not running (Or we cannot find the process), do you have it installed?",
5060
"Aimmy - Razer Synapse", MessageBoxButton.YesNo);
51-
//Debug.WriteLine("Couldn't Find Process");
5261
if (result == MessageBoxResult.No)
5362
{
5463
await InstallRazerSynapse();

0 commit comments

Comments
 (0)