Skip to content

Commit

Permalink
misc: update UnityHidApiPlugin.dll
Browse files Browse the repository at this point in the history
  • Loading branch information
LeZi9916 committed Oct 27, 2024
1 parent 19fc0a0 commit 4318944
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
Binary file modified Assets/Plugins/MychIO/Runtime/Plugins/UnityHidApiPlugin.dll
Binary file not shown.
41 changes: 21 additions & 20 deletions Assets/Script/DontDestroy/IO/InputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,25 @@ void Awake()
}
void CheckEnvironment(bool forceQuit = true)
{
// MSVC 2015-2019
var registryKey = @"SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64";
using var key = Registry.LocalMachine.OpenSubKey(registryKey);
if(key is null)
{
//var msg = "IO4 and HID input methods depend on the MSVC runtime library, but MajdataPlay did not find the MSVC runtime library on your computer. Please click \"OK\" to jump to download and install.";
var msg = Localization.GetLocalizedText(MajText.MISSING_MSVC_CONTENT);
if (string.IsNullOrEmpty(msg))
msg = "MSVCRT not found\r\nClick \"OK\" to download";
var title = "Missing MSVC";
if (forceQuit)
{
MessageBox.Show(msg, title, MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.OpenURL("https://aka.ms/vs/17/release/vc_redist.x64.exe");
Application.Quit();
}
else
Debug.LogWarning("Missing environment: MSVC runtime library not found.");
}
//// MSVC 2015-2019
//var registryKey = @"SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64";
//using var key = Registry.LocalMachine.OpenSubKey(registryKey);
//if(key is null)
//{
// //var msg = "IO4 and HID input methods depend on the MSVC runtime library, but MajdataPlay did not find the MSVC runtime library on your computer. Please click \"OK\" to jump to download and install.";
// var msg = Localization.GetLocalizedText(MajText.MISSING_MSVC_CONTENT);
// if (string.IsNullOrEmpty(msg))
// msg = "MSVCRT not found\r\nClick \"OK\" to download";
// var title = "Missing MSVC";
// if (forceQuit)
// {
// MessageBox.Show(msg, title, MessageBoxButtons.OK, MessageBoxIcon.Error);
// Application.OpenURL("https://aka.ms/vs/17/release/vc_redist.x64.exe");
// Application.Quit();
// }
// else
// Debug.LogWarning("Missing environment: MSVC runtime library not found.");
//}
}
void Start()
{
Expand Down Expand Up @@ -197,7 +197,8 @@ void StartExternalIOManager(bool useHID = false)
_ioManager.AddButtonRing(AdxIO4ButtonRing.GetDeviceName(),
inputSubscriptions: buttonRingCallbacks);
}
//_ioManager.AddLedDevice(AdxLedDevice.GetDeviceName());
_ioManager.AddLedDevice(AdxLedDevice.GetDeviceName());

UniTask.Void(async () =>
{
while (!_cancelSource.IsCancellationRequested)
Expand Down

0 comments on commit 4318944

Please sign in to comment.