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