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,24 +13,22 @@ namespace SceneManager
|
|||
{
|
||||
internal static void Main()
|
||||
{
|
||||
if (CheckRNUIVersion())
|
||||
{
|
||||
AppDomain.CurrentDomain.DomainUnload += MyTerminationHandler;
|
||||
Settings.LoadSettings();
|
||||
GetAssemblyVersion();
|
||||
MenuManager.InstantiateMenus();
|
||||
|
||||
DisplayHintsToOpenMenu();
|
||||
|
||||
GameFiber UserInputFiber = new GameFiber(() => GetUserInput.LoopForUserInput());
|
||||
UserInputFiber.Start();
|
||||
}
|
||||
else
|
||||
if(!InputManagerChecker() || !CheckRNUIVersion())
|
||||
{
|
||||
Game.UnloadActivePlugin();
|
||||
return;
|
||||
}
|
||||
|
||||
AppDomain.CurrentDomain.DomainUnload += MyTerminationHandler;
|
||||
Settings.LoadSettings();
|
||||
GetAssemblyVersion();
|
||||
MenuManager.InstantiateMenus();
|
||||
|
||||
DisplayHintsToOpenMenu();
|
||||
|
||||
GameFiber UserInputFiber = new GameFiber(() => GetUserInput.LoopForUserInput());
|
||||
UserInputFiber.Start();
|
||||
|
||||
void GetAssemblyVersion()
|
||||
{
|
||||
string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
|
|
@ -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()
|
||||
{
|
||||
if (Settings.ModifierKey == Keys.None && Settings.ModifierButton == ControllerButtons.None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue