From c3254eecf4ad7be7d10cde6a0b803c09de883914 Mon Sep 17 00:00:00 2001 From: Teemu Hukkanen Date: Fri, 25 Jul 2014 15:47:36 +0100 Subject: [PATCH] Use XDG_DATA_DIR for eeproms and roms, and update manual page accordingly --- docs/virtualjaguar.1 | 4 ++-- src/gui/mainwin.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/virtualjaguar.1 b/docs/virtualjaguar.1 index 5ebcdf3..b220179 100644 --- a/docs/virtualjaguar.1 +++ b/docs/virtualjaguar.1 @@ -131,13 +131,13 @@ Keypad # Virtualjaguar log file. If the file cannot be opened, the log it sent to standard output instead. The log file is overwritten on startup. .TP -.B ~/virtualjaguar/eeproms/ +.B ${XDG_DATA_HOME}/virtualjaguar/eeproms/ (typically ~/.local/share/data/virtualjaguar/eeproms/) Some Atari Jaguar cartridges feature a small writable EEPROM, used for saving game state and score lists. If this directory exists, virtualjaguar will emulate the EEPROM by saving the state in file in this directory. .TP -.B ~/virtualjaguar/software/ +.B ${XDG_DATA_HOME}/virtualjaguar/software/ (typically ~/.local/share/data/virtualjaguar/software/) The virtualjaguar GUI for loading software scans this directory, and shows the loadable files, along with information about the program, and a label image if one is included in a zip archive of the software. diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index 762c386..f4dda13 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -1122,8 +1122,8 @@ void MainWin::ReadSettings(void) vjs.allowWritesToROM = settings.value("writeROM", false).toBool(); vjs.biosType = settings.value("biosType", BT_M_SERIES).toInt(); vjs.useFastBlitter = settings.value("useFastBlitter", false).toBool(); - strcpy(vjs.EEPROMPath, settings.value("EEPROMs", "./eeproms/").toString().toAscii().data()); - strcpy(vjs.ROMPath, settings.value("ROMs", "./software/").toString().toAscii().data()); + strcpy(vjs.EEPROMPath, settings.value("EEPROMs", QDesktopServices::storageLocation(QDesktopServices::DataLocation).append("/eeproms/")).toString().toAscii().data()); + strcpy(vjs.ROMPath, settings.value("ROMs", QDesktopServices::storageLocation(QDesktopServices::DataLocation).append("/software/")).toString().toAscii().data()); strcpy(vjs.alpineROMPath, settings.value("DefaultROM", "").toString().toAscii().data()); strcpy(vjs.absROMPath, settings.value("DefaultABS", "").toString().toAscii().data()); -- 2.37.2