@@ -459,15 +459,16 @@ void PCSX::Widgets::Assembly::Offset(uint32_t addr, int size) {
459
459
}
460
460
}
461
461
462
- void PCSX::Widgets::Assembly::draw (GUI* gui, psxRegisters* registers, Memory* memory, const char * title) {
462
+ bool PCSX::Widgets::Assembly::draw (GUI* gui, psxRegisters* registers, Memory* memory, const char * title) {
463
+ bool changed = false ;
463
464
auto & cpu = g_emulator->m_cpu ;
464
465
m_registers = registers;
465
466
m_memory = memory;
466
467
ImGui::SetNextWindowPos (ImVec2 (10 , 30 ), ImGuiCond_FirstUseEver);
467
468
ImGui::SetNextWindowSize (ImVec2 (500 , 500 ), ImGuiCond_FirstUseEver);
468
469
if (!ImGui::Begin (title, &m_show, ImGuiWindowFlags_MenuBar)) {
469
470
ImGui::End ();
470
- return ;
471
+ return changed ;
471
472
}
472
473
473
474
float glyphWidth = ImGui::GetFontSize ();
@@ -1044,8 +1045,17 @@ if not success then return msg else return nil end
1044
1045
}
1045
1046
ImGui::End ();
1046
1047
1047
- if (openSymbolsDialog) m_symbolsFileDialog.openDialog ();
1048
+ auto & mapPath = g_emulator->settings .get <Emulator::SettingMapBrowsePath>();
1049
+
1050
+ if (openSymbolsDialog) {
1051
+ if (!mapPath.empty ()) {
1052
+ m_symbolsFileDialog.m_currentPath = mapPath.value ;
1053
+ }
1054
+ m_symbolsFileDialog.openDialog ();
1055
+ }
1048
1056
if (m_symbolsFileDialog.draw ()) {
1057
+ mapPath.value = m_symbolsFileDialog.m_currentPath ;
1058
+ changed = true ;
1049
1059
std::vector<PCSX::u8string> filesToOpen = m_symbolsFileDialog.selected ();
1050
1060
for (auto fileName : filesToOpen) {
1051
1061
std::ifstream file;
@@ -1100,6 +1110,7 @@ if not success then return msg else return nil end
1100
1110
}
1101
1111
ImGui::End ();
1102
1112
}
1113
+ return changed;
1103
1114
}
1104
1115
1105
1116
std::list<std::string> PCSX::Widgets::Assembly::findSymbol (uint32_t addr) {
0 commit comments