Skip to content

Commit af6a19d

Browse files
committed
use same working directory behaviour under Old CPU Simulator as normal
1 parent 3d0ba85 commit af6a19d

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

FlashpointSecurePlayer/FlashpointSecurePlayerConfigs/3dgroovegx.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<configSections>
4-
<section name="flashpointSecurePlayer" type="FlashpointSecurePlayer.Shared+FlashpointSecurePlayerSection, FlashpointSecurePlayer, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
4+
<section name="flashpointSecurePlayer" type="FlashpointSecurePlayer.Shared+FlashpointSecurePlayerSection, FlashpointSecurePlayer, Version=2.1.4.0, Culture=neutral, PublicKeyToken=null" />
55
</configSections>
66

77
<flashpointSecurePlayer>

FlashpointSecurePlayer/FlashpointSecurePlayerConfigs/3dgroovegxandup.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<configSections>
4-
<section name="flashpointSecurePlayer" type="FlashpointSecurePlayer.Shared+FlashpointSecurePlayerSection, FlashpointSecurePlayer, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
4+
<section name="flashpointSecurePlayer" type="FlashpointSecurePlayer.Shared+FlashpointSecurePlayerSection, FlashpointSecurePlayer, Version=2.1.4.0, Culture=neutral, PublicKeyToken=null" />
55
</configSections>
66

77
<flashpointSecurePlayer>

FlashpointSecurePlayer/OldCPUSimulator.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ public void Activate(string templateName, ref ProcessStartInfo softwareProcessSt
143143
// USB the HDMI to .exe the database
144144
string commandLineExpanded = Environment.ExpandEnvironmentVariables(modeElement.CommandLine);
145145
StringBuilder oldCPUSimulatorSoftware = new StringBuilder();
146+
string workingDirectory = null;
146147

147148
// the problem we're dealing with here
148149
// is that we need to get the full path to
@@ -158,6 +159,7 @@ public void Activate(string templateName, ref ProcessStartInfo softwareProcessSt
158159
}
159160

160161
string fullPath = Path.GetFullPath(argv[0]);
162+
workingDirectory = Path.GetDirectoryName(fullPath);
161163
GetValidArgument(ref fullPath);
162164
oldCPUSimulatorSoftware.Append(fullPath);
163165
} catch (Exception ex) {
@@ -189,7 +191,11 @@ public void Activate(string templateName, ref ProcessStartInfo softwareProcessSt
189191
// default the working directory to here
190192
// (otherwise it'd get set to Old CPU Simulator's directory, not desirable)
191193
if (String.IsNullOrEmpty(modeElement.WorkingDirectory)) {
192-
softwareProcessStartInfo.WorkingDirectory = Environment.CurrentDirectory;
194+
if (String.IsNullOrEmpty(workingDirectory)) {
195+
softwareProcessStartInfo.WorkingDirectory = Environment.CurrentDirectory;
196+
} else {
197+
softwareProcessStartInfo.WorkingDirectory = workingDirectory;
198+
}
193199
}
194200
return;
195201
}

0 commit comments

Comments
 (0)