-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathApp.Logitech.cs
More file actions
36 lines (33 loc) · 790 Bytes
/
Copy pathApp.Logitech.cs
File metadata and controls
36 lines (33 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Windows;
namespace MarvinsAIRA
{
public partial class App : Application
{
private bool _logitech_disabled = false;
public void UpdateLogitech()
{
if ( Settings.ControlRPMLights )
{
if ( !_logitech_disabled && _irsdk_connected && ( _ffb_drivingJoystick != null ) )
{
try
{
if ( !LogitechGSDK.LogiPlayLedsDInput( _ffb_drivingJoystick.NativePointer, _irsdk_rpm, _irsdk_shiftLightsFirstRPM, _irsdk_shiftLightsBlinkRPM ) )
{
_logitech_disabled = true;
}
}
catch ( Exception )
{
_logitech_disabled = true;
}
if ( _logitech_disabled )
{
WriteLine( "The Logitech G SDK doesn't seem to be working, so we are disabling Logitech shift lights support." );
}
}
}
}
}
}