mirror of
https://github.com/libretro/Mesen.git
synced 2024-12-16 05:48:05 +00:00
Fixed crashes
This commit is contained in:
parent
e1fae4e302
commit
973c21c000
@ -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) {
|
||||
|
@ -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 { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user