summaryrefslogtreecommitdiff
path: root/src/SMAPI.Toolkit/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-24 21:59:52 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-25 18:25:17 -0400
commitf8c76bde39ba2afb11540c9af5d88aad4c73f789 (patch)
treee27d552daeb113bc069bed0400b25a96ce2ba85c /src/SMAPI.Toolkit/Framework
parente1d8838587329bd64f3627c4cdc4ac57d187ad7f (diff)
downloadSMAPI-f8c76bde39ba2afb11540c9af5d88aad4c73f789.tar.gz
SMAPI-f8c76bde39ba2afb11540c9af5d88aad4c73f789.tar.bz2
SMAPI-f8c76bde39ba2afb11540c9af5d88aad4c73f789.zip
add 64-bit compatibility check before loading mods
That reduces time spent trying to rewrite them (which won't work anyway), and shows a more informative message than the default 'DLL couldn't be loaded' error.
Diffstat (limited to 'src/SMAPI.Toolkit/Framework')
-rw-r--r--src/SMAPI.Toolkit/Framework/LowLevelEnvironmentUtility.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/SMAPI.Toolkit/Framework/LowLevelEnvironmentUtility.cs b/src/SMAPI.Toolkit/Framework/LowLevelEnvironmentUtility.cs
index be0c18ce..2636aae0 100644
--- a/src/SMAPI.Toolkit/Framework/LowLevelEnvironmentUtility.cs
+++ b/src/SMAPI.Toolkit/Framework/LowLevelEnvironmentUtility.cs
@@ -90,10 +90,10 @@ namespace StardewModdingAPI.Toolkit.Framework
}
/// <summary>Get whether an executable is 64-bit.</summary>
- /// <param name="executablePath">The absolute path to the executable file.</param>
- public static bool Is64BitAssembly(string executablePath)
+ /// <param name="path">The absolute path to the assembly file.</param>
+ public static bool Is64BitAssembly(string path)
{
- return AssemblyName.GetAssemblyName(executablePath).ProcessorArchitecture != ProcessorArchitecture.X86;
+ return AssemblyName.GetAssemblyName(path).ProcessorArchitecture != ProcessorArchitecture.X86;
}