diff options
Diffstat (limited to 'src/SMAPI/Framework/SCore.cs')
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 5fb4aa03..dff0fc55 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -1704,12 +1704,21 @@ namespace StardewModdingAPI.Framework // load as mod else { + // get mod info 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 - string assemblyPath = manifest?.EntryDll != null - ? Path.Combine(mod.DirectoryPath, manifest.EntryDll) - : null; Assembly modAssembly; try { |