Added search paths in case of missing DWARF directories information
[clinton/Virtual-Jaguar-Rx.git] / src / gui / mainwin.cpp
index ff0e195..9b03922 100644 (file)
@@ -20,6 +20,7 @@
 // JPM  11/04/2017  Added the local window\r
 // JPM  08/31/2018  Added the call stack window\r
 // JPM  Sept./2018  Added the new Models and BIOS handler, a screenshot feature and source code files browsing\r
 // JPM  11/04/2017  Added the local window\r
 // JPM  08/31/2018  Added the call stack window\r
 // JPM  Sept./2018  Added the new Models and BIOS handler, a screenshot feature and source code files browsing\r
+// JPM  10/10/2018  Added search paths in the settings\r
 //\r
 \r
 // FIXED:\r
 //\r
 \r
 // FIXED:\r
@@ -83,6 +84,7 @@
 #include "joystick.h"\r
 #include "m68000/m68kinterface.h"\r
 \r
 #include "joystick.h"\r
 #include "m68000/m68kinterface.h"\r
 \r
+#include "debugger/DBGManager.h"\r
 //#include "debugger/VideoWin.h"\r
 //#include "debugger/DasmWin.h"\r
 #include "debugger/m68KDasmWin.h"\r
 //#include "debugger/VideoWin.h"\r
 //#include "debugger/DasmWin.h"\r
 #include "debugger/m68KDasmWin.h"\r
@@ -1763,6 +1765,7 @@ void MainWin::ReadSettings(void)
        // Read settings from the Debugger mode\r
        settings.beginGroup("debugger");\r
        strcpy(vjs.debuggerROMPath, settings.value("DefaultROM", "").toString().toUtf8().data());\r
        // Read settings from the Debugger mode\r
        settings.beginGroup("debugger");\r
        strcpy(vjs.debuggerROMPath, settings.value("DefaultROM", "").toString().toUtf8().data());\r
+       strcpy(vjs.sourcefilesearchPaths, settings.value("SourceFileSearchPaths", "").toString().toUtf8().data());\r
        vjs.nbrdisasmlines = settings.value("NbrDisasmLines", 32).toUInt();\r
        vjs.disasmopcodes = settings.value("DisasmOpcodes", true).toBool();\r
        vjs.displayHWlabels = settings.value("DisplayHWLabels", true).toBool();\r
        vjs.nbrdisasmlines = settings.value("NbrDisasmLines", 32).toUInt();\r
        vjs.disasmopcodes = settings.value("DisasmOpcodes", true).toBool();\r
        vjs.displayHWlabels = settings.value("DisplayHWLabels", true).toBool();\r
@@ -1788,13 +1791,15 @@ void MainWin::ReadSettings(void)
 \r
        // Write important settings to the log file\r
        WriteLog("MainWin: Paths\n");\r
 \r
        // Write important settings to the log file\r
        WriteLog("MainWin: Paths\n");\r
-       WriteLog("     EEPROMPath = \"%s\"\n", vjs.EEPROMPath);\r
-       WriteLog("        ROMPath = \"%s\"\n", vjs.ROMPath);\r
-       WriteLog("  AlpineROMPath = \"%s\"\n", vjs.alpineROMPath);\r
-       WriteLog("DebuggerROMPath = \"%s\"\n", vjs.debuggerROMPath);\r
-       WriteLog("     absROMPath = \"%s\"\n", vjs.absROMPath);\r
-       WriteLog("ScreenshotsPath = \"%s\"\n", vjs.screenshotPath);\r
-       WriteLog("  Pipelined DSP = %s\n", (vjs.usePipelinedDSP ? "ON" : "off"));\r
+       WriteLog("           EEPROMPath = \"%s\"\n", vjs.EEPROMPath);\r
+       WriteLog("              ROMPath = \"%s\"\n", vjs.ROMPath);\r
+       WriteLog("        AlpineROMPath = \"%s\"\n", vjs.alpineROMPath);\r
+       WriteLog("      DebuggerROMPath = \"%s\"\n", vjs.debuggerROMPath);\r
+       WriteLog("           absROMPath = \"%s\"\n", vjs.absROMPath);\r
+       WriteLog("      ScreenshotsPath = \"%s\"\n", vjs.screenshotPath);\r
+       WriteLog("SourceFileSearchPaths = \"%s\"\n", vjs.sourcefilesearchPaths);\r
+       WriteLog("MainWin: Misc.\n");\r
+       WriteLog("   Pipelined DSP = %s\n", (vjs.usePipelinedDSP ? "ON" : "off"));\r
 \r
 #if 0\r
        // Keybindings in order of U, D, L, R, C, B, A, Op, Pa, 0-9, #, *\r
 \r
 #if 0\r
        // Keybindings in order of U, D, L, R, C, B, A, Op, Pa, 0-9, #, *\r
@@ -1846,6 +1851,7 @@ void MainWin::ReadSettings(void)
        WriteLog("Read setting = Done\n");\r
 \r
        ReadProfiles(&settings);\r
        WriteLog("Read setting = Done\n");\r
 \r
        ReadProfiles(&settings);\r
+       DBGManager_SourceFileSearchPathsSet(vjs.sourcefilesearchPaths);\r
 }\r
 \r
 \r
 }\r
 \r
 \r
@@ -2049,6 +2055,7 @@ void MainWin::WriteSettings(void)
        settings.setValue("displayFullSourceFilename", vjs.displayFullSourceFilename);\r
        settings.setValue("NbrMemory1BrowserWindow", (unsigned int)vjs.nbrmemory1browserwindow);\r
        settings.setValue("DefaultROM", vjs.debuggerROMPath);\r
        settings.setValue("displayFullSourceFilename", vjs.displayFullSourceFilename);\r
        settings.setValue("NbrMemory1BrowserWindow", (unsigned int)vjs.nbrmemory1browserwindow);\r
        settings.setValue("DefaultROM", vjs.debuggerROMPath);\r
+       settings.setValue("SourceFileSearchPaths", vjs.sourcefilesearchPaths);\r
        settings.endGroup();\r
 \r
        // Write settings from the Keybindings\r
        settings.endGroup();\r
 \r
        // Write settings from the Keybindings\r
@@ -2106,6 +2113,7 @@ void MainWin::WriteSettings(void)
 #endif\r
 \r
        WriteProfiles(&settings);\r
 #endif\r
 \r
        WriteProfiles(&settings);\r
+       DBGManager_SourceFileSearchPathsSet(vjs.sourcefilesearchPaths);\r
 }\r
 \r
 \r
 }\r
 \r
 \r