Skip to content

Commit

Permalink
Fixing Build and Run on Regen
Browse files Browse the repository at this point in the history
Path.GetFullPath should convert the '/' to '\', allowing regen.ini's
LastROM to be...

\s1disasm\s1built.bin

instead of...

\s1disasm\../s1built.bin
  • Loading branch information
Clownacy committed May 11, 2015
1 parent 31ddc70 commit 5ef8527
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SonLVL/MainForm.cs
Expand Up @@ -754,11 +754,11 @@ private void buildAndRunToolStripMenuItem_Click(object sender, EventArgs e)
string romfile = LevelData.Game.ROMFile ?? LevelData.Game.RunCommand;
if (LevelData.Game.UseEmulator)
if (!string.IsNullOrEmpty(Settings.Emulator))
System.Diagnostics.Process.Start(Settings.Emulator, '"' + Path.Combine(Environment.CurrentDirectory, romfile) + '"');
System.Diagnostics.Process.Start(Settings.Emulator, '"' + Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, romfile)) + '"');
else
MessageBox.Show("You must set up an emulator before you can run the ROM, use File -> Setup Emulator.");
else
System.Diagnostics.Process.Start(Path.Combine(Environment.CurrentDirectory, romfile));
System.Diagnostics.Process.Start(Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, romfile)));
}

private void setupEmulatorToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down

0 comments on commit 5ef8527

Please sign in to comment.