plugin head angle override deactivates if trackir software wasn't running on startup
This commit is contained in:
parent
574889b512
commit
13c1040e77
@ -3,8 +3,8 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<AssemblyName>JBTrackIR</AssemblyName>
|
||||
<Description>My first plugin</Description>
|
||||
<Version>1.0.0</Version>
|
||||
<Description>SPT TrackIR Support</Description>
|
||||
<Version>1.0.1</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<RestoreAdditionalProjectSources>
|
||||
|
@ -16,7 +16,7 @@ using UnityEngine;
|
||||
|
||||
namespace JBTrackIR;
|
||||
|
||||
[BepInPlugin("com.jonbons.trackir", "JonBons.TrackIR", "1.0.0")]
|
||||
[BepInPlugin("com.jonbons.trackir", "JonBons.TrackIR", "1.0.1")]
|
||||
public class Plugin : BaseUnityPlugin
|
||||
{
|
||||
static ConfigEntry<bool> tirEnabled;
|
||||
@ -36,9 +36,16 @@ public class Plugin : BaseUnityPlugin
|
||||
tirClient = new TrackIRClient();
|
||||
if (tirClient != null && !tirRunning)
|
||||
{
|
||||
tirClient.TrackIR_Enhanced_Init();
|
||||
tirRunning = true;
|
||||
Logger.LogInfo($"com.jonbons.trackir: trackir is running");
|
||||
var result = tirClient.TrackIR_Enhanced_Init();
|
||||
Logger.LogInfo($"com.jonbons.trackir: detecting... {result}");
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
tirRunning = true;
|
||||
Logger.LogInfo($"com.jonbons.trackir: detected");
|
||||
}
|
||||
else {
|
||||
Logger.LogInfo($"com.jonbons.trackir: not detected");
|
||||
}
|
||||
}
|
||||
|
||||
BindSettings();
|
||||
|
Loading…
x
Reference in New Issue
Block a user