Fixed crashes

This commit is contained in:
Souryo 2017-04-09 08:33:24 -04:00
parent e1fae4e302
commit 973c21c000
2 changed files with 16 additions and 14 deletions

View File

@ -124,7 +124,7 @@ void TraceLogger::GetTraceRow(string &output, State &cpuState, PPUDebugState &pp
LabelManager* labelManager = _options.UseLabels ? _labelManager.get() : nullptr;
disassemblyInfo->ToString(code, cpuState.DebugPC, _memoryManager.get(), labelManager);
disassemblyInfo->GetEffectiveAddressString(code, cpuState, _memoryManager.get(), labelManager);
code += std::string(32 - code.size(), ' ');
code += std::string(std::max(0, (int)(32 - code.size())), ' ');
output += code;
if(_options.ShowRegisters) {

View File

@ -82,20 +82,22 @@ namespace Mesen.GUI.Forms
{
if(args.Length > 0) {
foreach(string arg in args) {
string path = arg;
try {
if(File.Exists(path)) {
this.LoadFile(path);
break;
}
if(arg != null) {
string path = arg;
try {
if(File.Exists(path)) {
this.LoadFile(path);
break;
}
//Try loading file as a relative path to the folder Mesen was started from
path = Path.Combine(Program.OriginalFolder, path);
if(File.Exists(path)) {
this.LoadFile(path);
break;
}
} catch { }
//Try loading file as a relative path to the folder Mesen was started from
path = Path.Combine(Program.OriginalFolder, path);
if(File.Exists(path)) {
this.LoadFile(path);
break;
}
} catch { }
}
}
}
}