mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added check for InputManager.dll alongside RNUI version checker.
This commit is contained in:
parent
23af515692
commit
d760675b27
1 changed files with 24 additions and 13 deletions
|
|
@ -13,8 +13,12 @@ namespace SceneManager
|
||||||
{
|
{
|
||||||
internal static void Main()
|
internal static void Main()
|
||||||
{
|
{
|
||||||
if (CheckRNUIVersion())
|
if(!InputManagerChecker() || !CheckRNUIVersion())
|
||||||
{
|
{
|
||||||
|
Game.UnloadActivePlugin();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
AppDomain.CurrentDomain.DomainUnload += MyTerminationHandler;
|
AppDomain.CurrentDomain.DomainUnload += MyTerminationHandler;
|
||||||
Settings.LoadSettings();
|
Settings.LoadSettings();
|
||||||
GetAssemblyVersion();
|
GetAssemblyVersion();
|
||||||
|
|
@ -24,12 +28,6 @@ namespace SceneManager
|
||||||
|
|
||||||
GameFiber UserInputFiber = new GameFiber(() => GetUserInput.LoopForUserInput());
|
GameFiber UserInputFiber = new GameFiber(() => GetUserInput.LoopForUserInput());
|
||||||
UserInputFiber.Start();
|
UserInputFiber.Start();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Game.UnloadActivePlugin();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GetAssemblyVersion()
|
void GetAssemblyVersion()
|
||||||
{
|
{
|
||||||
|
|
@ -62,6 +60,19 @@ namespace SceneManager
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool InputManagerChecker()
|
||||||
|
{
|
||||||
|
var directory = Directory.GetCurrentDirectory();
|
||||||
|
var exists = File.Exists(directory + @"\InputManager.dll");
|
||||||
|
if (!exists)
|
||||||
|
{
|
||||||
|
Game.LogTrivial($"InputManager was not found in the user's GTA V directory.");
|
||||||
|
Game.DisplayNotification($"~o~Scene Manager ~r~[Error]\n~w~InputManager.dll was not found in your GTA V directory. Please install InputManager.dll and try again.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
private static void DisplayHintsToOpenMenu()
|
private static void DisplayHintsToOpenMenu()
|
||||||
{
|
{
|
||||||
if (Settings.ModifierKey == Keys.None && Settings.ModifierButton == ControllerButtons.None)
|
if (Settings.ModifierKey == Keys.None && Settings.ModifierButton == ControllerButtons.None)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue