From d5c4108eff9aef8ca1feb33c033b9769fd2ccad6 Mon Sep 17 00:00:00 2001 From: Paul Sladen Date: Wed, 29 Jul 2009 18:24:09 +0100 Subject: [PATCH] PluginManager.cs: restrict 'IntPtr.Size == 4' check to Win32 only --- openBVE/OpenBve/PluginManager.cs | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openBVE/OpenBve/PluginManager.cs b/openBVE/OpenBve/PluginManager.cs index 6fe2303..c9d79b7 100644 --- a/openBVE/OpenBve/PluginManager.cs +++ b/openBVE/OpenBve/PluginManager.cs @@ -581,9 +581,9 @@ namespace OpenBve { string DllTitle = System.IO.File.ReadAllText(File, Encoding).Trim(); string DllFile = Interface.GetCombinedFileName(TrainPath, DllTitle); if (System.IO.File.Exists(DllFile)) { - if (Program.CurrentPlatform == Program.Platform.Windows) { + if (Program.CurrentPlatform == Program.Platform.Windows | + (Program.CurrentPlatform == Program.Platform.Linux && DllTitle.EndsWith(".so", StringComparison.OrdinalIgnoreCase))) { - if (IntPtr.Size == 4) { + if (IntPtr.Size == 4 || Program.CurrentPlatform != Program.Platform.Windows) { PluginLoadState State = LoadPlugin(DllFile, Train); switch (State) { case PluginLoadState.CouldNotLoadDll: -- 1.6.0.4