1
0
Fork 0
This commit is contained in:
Duncan Ogilvie 2019-04-06 12:40:11 +02:00
parent 543c483cce
commit 311a226316
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 12 additions and 1 deletions

View File

@ -2580,8 +2580,17 @@ static void debugLoopFunction(void* lpParameter, bool attach)
bFileIsDll = IsFileDLLW(StringUtils::Utf8ToUtf16(szFileName).c_str(), 0); bFileIsDll = IsFileDLLW(StringUtils::Utf8ToUtf16(szFileName).c_str(), 0);
DbSetPath(nullptr, szFileName); DbSetPath(nullptr, szFileName);
String recentFile;
if(!attach) if(!attach)
{ {
// Build recent file string
recentFile = szFileName;
recentFile += ":";
recentFile += init->currentfolder ? init->currentfolder : "";
recentFile += ":";
recentFile += init->commandline ? init->commandline : "";
// Load command line if it exists in DB // Load command line if it exists in DB
DbLoad(DbLoadSaveType::CommandLine); DbLoad(DbLoadSaveType::CommandLine);
if(!isCmdLineEmpty()) if(!isCmdLineEmpty())
@ -2657,6 +2666,8 @@ static void debugLoopFunction(void* lpParameter, bool attach)
} }
else //attach else //attach
{ {
recentFile = szFileName;
recentFile += "::";
gInitCmd.clear(); gInitCmd.clear();
gInitDir.clear(); gInitDir.clear();
} }
@ -2676,7 +2687,7 @@ static void debugLoopFunction(void* lpParameter, bool attach)
//inform GUI we started without problems //inform GUI we started without problems
GuiSetDebugState(initialized); GuiSetDebugState(initialized);
GuiFocusView(GUI_DISASSEMBLY); GuiFocusView(GUI_DISASSEMBLY);
GuiAddRecentFile(szFileName); GuiAddRecentFile(recentFile.c_str());
//set GUI title //set GUI title
strcpy_s(szBaseFileName, szFileName); strcpy_s(szBaseFileName, szFileName);