mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Initializing Chroma SDK before connected check
Moved Input hook further down the boot process
This commit is contained in:
parent
ac182040f2
commit
96afd7bbb7
@ -34,7 +34,6 @@ namespace Artemis
|
|||||||
|
|
||||||
Initialize();
|
Initialize();
|
||||||
BindSpecialValues();
|
BindSpecialValues();
|
||||||
InputHook.Start();
|
|
||||||
|
|
||||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
|
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
|
||||||
}
|
}
|
||||||
@ -98,6 +97,7 @@ namespace Artemis
|
|||||||
logger.Info("Artemis was run using the autorun shortcut, sleeping for 15 sec.");
|
logger.Info("Artemis was run using the autorun shortcut, sleeping for 15 sec.");
|
||||||
Thread.Sleep(15000);
|
Thread.Sleep(15000);
|
||||||
}
|
}
|
||||||
|
InputHook.Start();
|
||||||
_kernel = new StandardKernel(new BaseModules(), new ManagerModules());
|
_kernel = new StandardKernel(new BaseModules(), new ManagerModules());
|
||||||
|
|
||||||
_kernel.Bind<IWindowManager>().To<WindowManager>().InSingletonScope();
|
_kernel.Bind<IWindowManager>().To<WindowManager>().InSingletonScope();
|
||||||
|
|||||||
@ -37,8 +37,11 @@ namespace Artemis.DeviceProviders.Razer
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Some people have Synapse installed, but not a Chroma keyboard, deal with this
|
// Some people have Synapse installed, but not a Chroma keyboard, deal with this
|
||||||
|
Chroma.Instance.Initialize();
|
||||||
var blackWidowFound = Chroma.Instance.Query(Devices.Blackwidow).Connected;
|
var blackWidowFound = Chroma.Instance.Query(Devices.Blackwidow).Connected;
|
||||||
var blackWidowTeFound = Chroma.Instance.Query(Devices.BlackwidowTe).Connected;
|
var blackWidowTeFound = Chroma.Instance.Query(Devices.BlackwidowTe).Connected;
|
||||||
|
Chroma.Instance.Uninitialize();
|
||||||
|
|
||||||
return blackWidowFound || blackWidowTeFound;
|
return blackWidowFound || blackWidowTeFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -108,6 +108,7 @@ namespace Artemis.Managers
|
|||||||
public async void EnableProgram()
|
public async void EnableProgram()
|
||||||
{
|
{
|
||||||
Logger.Debug("Enabling program");
|
Logger.Debug("Enabling program");
|
||||||
|
|
||||||
ProgramEnabled = true;
|
ProgramEnabled = true;
|
||||||
await LoopManager.StartAsync();
|
await LoopManager.StartAsync();
|
||||||
|
|
||||||
@ -121,9 +122,12 @@ namespace Artemis.Managers
|
|||||||
public void DisableProgram()
|
public void DisableProgram()
|
||||||
{
|
{
|
||||||
Logger.Debug("Disabling program");
|
Logger.Debug("Disabling program");
|
||||||
|
|
||||||
foreach (var overlayModule in ModuleManager.OverlayModules)
|
foreach (var overlayModule in ModuleManager.OverlayModules)
|
||||||
|
{
|
||||||
if (overlayModule.Settings.IsEnabled)
|
if (overlayModule.Settings.IsEnabled)
|
||||||
overlayModule.Dispose();
|
overlayModule.Dispose();
|
||||||
|
}
|
||||||
LoopManager.Stop();
|
LoopManager.Stop();
|
||||||
ProgramEnabled = false;
|
ProgramEnabled = false;
|
||||||
RaiseEnabledChangedEvent(new EnabledChangedEventArgs(ProgramEnabled));
|
RaiseEnabledChangedEvent(new EnabledChangedEventArgs(ProgramEnabled));
|
||||||
@ -178,4 +182,4 @@ namespace Artemis.Managers
|
|||||||
handler?.Invoke(this, e);
|
handler?.Invoke(this, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user