Skip to content

Commit b688ca2

Browse files
committed
Automatic merge of T1.5.1-687-gd279e384a and 11 pull requests
- Pull request #570 at c59c788: Experimental glTF 2.0 support with PBR lighting - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #865 at 67014b7: Dispatcher window improvements - Pull request #874 at f8dbeab: Dynamic brake controller refactoring - Pull request #875 at 43bf33e: Bug fix for https://bugs.launchpad.net/or/+bug/2036346 Player train switching doesn't work with 3D cabs - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #878 at 25f5e06: Implement Polach Adhesion - Pull request #882 at d8a1c4d: Blueprint/train car operations UI window - Pull request #883 at edcc2dd: SwitchPanel disconnect/connect handling - Pull request #885 at c81447b: feat: Add notifications to Menu - Pull request #886 at 7c4922e: Scene viewer extension to TrackViewer
13 parents acdedd2 + d279e38 + c59c788 + d00beb9 + 67014b7 + f8dbeab + 43bf33e + f92de76 + 25f5e06 + d8a1c4d + edcc2dd + c81447b + 7c4922e commit b688ca2

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Source/Contrib/TrackViewer/Program.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// COPYRIGHT 2014, 2018 by the Open Rails project.
1+
// COPYRIGHT 2014, 2018 by the Open Rails project.
22
//
33
// This file is part of Open Rails.
44
//
@@ -15,10 +15,11 @@
1515
// You should have received a copy of the GNU General Public License
1616
// along with Open Rails. If not, see <http://www.gnu.org/licenses/>.
1717
using System;
18+
using System.IO;
1819
using System.Diagnostics;
20+
using System.Reflection;
1921
using System.Windows.Forms;
2022

21-
2223
namespace ORTS.TrackViewer
2324
{
2425
static class Program
@@ -31,6 +32,11 @@ static void Main(string[] args)
3132
{
3233
using (TrackViewer trackViewer = new TrackViewer(args))
3334
{
35+
//enables loading of dll for specific architecture(32 or 64bit) from distinct folders, useful when both versions require same name (as for OpenAL32.dll)
36+
string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Native");
37+
path = Path.Combine(path, (Environment.Is64BitProcess) ? "X64" : "X86");
38+
Orts.NativeMethods.SetDllDirectory(path);
39+
3440
// code below is modified version from what is found in GameStateRunActivity.cs
3541
if (Debugger.IsAttached) // Separate code path during debugging, so IDE stops at the problem and not at the message.
3642
{

Source/RunActivity/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131

3232
namespace Orts
3333
{
34-
static class NativeMethods
34+
public static class NativeMethods
3535
{
3636
[DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall)]
37-
internal static extern bool SetDllDirectory(string pathName);
37+
public static extern bool SetDllDirectory(string pathName);
3838
}
3939

4040
static class Program

0 commit comments

Comments
 (0)