summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-26 01:12:37 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-26 01:12:37 -0400
commit22a895d27c79f2f0cc04e02de89bf55f2448994e (patch)
treebe9761c68cab23c8a83473054aaae0ea6881a36a /src/SMAPI/Framework
parentc95de4e109203e45d07a35a448c21ee43eb976f3 (diff)
downloadSMAPI-22a895d27c79f2f0cc04e02de89bf55f2448994e.tar.gz
SMAPI-22a895d27c79f2f0cc04e02de89bf55f2448994e.tar.bz2
SMAPI-22a895d27c79f2f0cc04e02de89bf55f2448994e.zip
only check 64-bit compatibility if an assembly fails to load
Apparently some 32-bit-only DLLs load successfully with the unofficial 64-bit version of the game.
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/SCore.cs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index dff0fc55..c1aa3721 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -1708,16 +1708,6 @@ namespace StardewModdingAPI.Framework
IManifest manifest = mod.Manifest;
string assemblyPath = Path.Combine(mod.DirectoryPath, manifest.EntryDll);
- // assert 64-bit
-#if SMAPI_FOR_WINDOWS_64BIT_HACK
- if (!EnvironmentUtility.Is64BitAssembly(assemblyPath))
- {
- errorReasonPhrase = "it needs to be updated for 64-bit mode.";
- failReason = ModFailReason.LoadFailed;
- return false;
- }
-#endif
-
// load mod
Assembly modAssembly;
try
@@ -1741,6 +1731,10 @@ namespace StardewModdingAPI.Framework
catch (Exception ex)
{
errorReasonPhrase = "its DLL couldn't be loaded.";
+#if SMAPI_FOR_WINDOWS_64BIT_HACK
+ if (!EnvironmentUtility.Is64BitAssembly(assemblyPath))
+ errorReasonPhrase = "it needs to be updated for 64-bit mode.";
+#endif
errorDetails = $"Error: {ex.GetLogSummary()}";
failReason = ModFailReason.LoadFailed;
return false;