diff --git a/docs/index.html b/docs/index.html
index a13b137d8..c9d7a2553 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -2267,8 +2267,23 @@
Go to parent directory (also in other file dialogs) |
- Backspace |
- Backspace |
+ Backspace, Alt + Up arrow |
+ Backspace, Alt + Up arrow |
+
+
+ Go to home directory |
+ Alt + Home |
+ Alt + Home |
+
+
+ Go to previous directory in history |
+ Alt + Left arrow |
+ Alt + Left arrow |
+
+
+ Go to next directory in history |
+ Alt + Right arrow |
+ Alt + Right arrow |
Remove from 'Recently Played' or 'Most Popular' folder |
diff --git a/src/emucore/CartBUS.cxx b/src/emucore/CartBUS.cxx
index d181c7742..69eae0b0d 100644
--- a/src/emucore/CartBUS.cxx
+++ b/src/emucore/CartBUS.cxx
@@ -67,9 +67,9 @@ CartridgeBUS::CartridgeBUS(const ByteBuffer& image, size_t size,
reinterpret_cast(myImage.get()),
reinterpret_cast(myRAM.data()),
static_cast(32_KB),
- 0x00000800,
- 0x00000808,
- 0x40001FDC,
+ Thumbulator::rom_base + 0x0800,
+ Thumbulator::rom_base + 0x0808,
+ Thumbulator::ram_base + 0x1FDC,
devSettings ? settings.getBool("dev.thumb.trapfatal") : false,
devSettings ? static_cast(
settings.getFloat("dev.thumb.cyclefactor")) : 1.0,
@@ -256,8 +256,8 @@ uInt8 CartridgeBUS::peek(uInt16 address)
// get sample value from ROM or RAM
if (sampleaddress < 0x8000)
peekvalue = myImage[sampleaddress];
- else if (sampleaddress >= 0x40000000 && sampleaddress < 0x40002000) // check for RAM
- peekvalue = myRAM[sampleaddress - 0x40000000];
+ else if (sampleaddress >= Thumbulator::ram_base && sampleaddress < Thumbulator::ram_base + 0x2000) // check for RAM
+ peekvalue = myRAM[sampleaddress - Thumbulator::ram_base];
else
peekvalue = 0;
@@ -707,7 +707,7 @@ uInt32 CartridgeBUS::getWaveform(uInt8 index) const
(myRAM[WAVEFORM + index*4 + 2] << 16) +
(myRAM[WAVEFORM + index*4 + 3] << 24); // high byte
- result -= 0x40000800;
+ result -= Thumbulator::ram_base + 0x0800;
if (result >= 4096)
result = 0;
diff --git a/src/emucore/CartCDF.cxx b/src/emucore/CartCDF.cxx
index 547e83a50..6d9d4b1b1 100644
--- a/src/emucore/CartCDF.cxx
+++ b/src/emucore/CartCDF.cxx
@@ -90,13 +90,13 @@ CartridgeCDF::CartridgeCDF(const ByteBuffer& image, size_t size,
// C addresses
uInt32 cBase, cStart, cStack;
if (isCDFJplus()) {
- cBase = getUInt32(myImage.get(), 0x17F8) & 0xFFFFFFFE; // C Base Address
+ cBase = Thumbulator::rom_base + getUInt32(myImage.get(), 0x17F8) & 0x0FFFFFFE; // C Base Address
cStart = cBase; // C Start Address
- cStack = getUInt32(myImage.get(), 0x17F4); // C Stack
+ cStack = Thumbulator::ram_base + (getUInt32(myImage.get(), 0x17F4) & 0x0FFFFFFF); // C Stack
} else {
- cBase = 0x800; // C Base Address
- cStart = 0x808; // C Start Address (skip ARM header)
- cStack = 0x40001FDC; // C Stack
+ cBase = Thumbulator::rom_base + 0x800; // C Base Address
+ cStart = Thumbulator::rom_base + 0x808; // C Start Address (skip ARM header)
+ cStack = Thumbulator::ram_base + 0x1FDC; // C Stack
}
// Create Thumbulator ARM emulator
@@ -296,8 +296,8 @@ uInt8 CartridgeCDF::peek(uInt16 address)
// get sample value from ROM or RAM
if (sampleaddress < 0x00080000)
peekvalue = myImage[sampleaddress];
- else if (sampleaddress >= 0x40000000 && sampleaddress < 0x40008000) // check for RAM
- peekvalue = myRAM[sampleaddress - 0x40000000];
+ else if (sampleaddress >= Thumbulator::ram_base && sampleaddress < Thumbulator::ram_base + 0x8000) // check for RAM
+ peekvalue = myRAM[sampleaddress - Thumbulator::ram_base];
else
peekvalue = 0;
@@ -677,7 +677,7 @@ uInt32 CartridgeCDF::getWaveform(uInt8 index) const
(myRAM[address + 2] << 16) +
(myRAM[address + 3] << 24); // high byte
- result -= (0x40000000 + uInt32(2_KB));
+ result -= (Thumbulator::ram_base + uInt32(2_KB));
if (!isCDFJplus()) {
if (result >= 4096) {
diff --git a/src/emucore/CartDPCPlus.cxx b/src/emucore/CartDPCPlus.cxx
index 8d9b99b72..97586aa65 100644
--- a/src/emucore/CartDPCPlus.cxx
+++ b/src/emucore/CartDPCPlus.cxx
@@ -53,9 +53,9 @@ CartridgeDPCPlus::CartridgeDPCPlus(const ByteBuffer& image, size_t size,
(reinterpret_cast(myImage.get()),
reinterpret_cast(myDPCRAM.data()),
static_cast(32_KB),
- 0x00000C00,
- 0x00000C08,
- 0x40001FDC,
+ Thumbulator::rom_base + 0x0C00,
+ Thumbulator::rom_base + 0x0C08,
+ Thumbulator::ram_base + 0x1FDC,
devSettings ? settings.getBool("dev.thumb.trapfatal") : false,
devSettings ? static_cast(
settings.getFloat("dev.thumb.cyclefactor")) : 1.0,
diff --git a/src/emucore/Thumbulator.cxx b/src/emucore/Thumbulator.cxx
index d32881fa7..96ac7dd5e 100644
--- a/src/emucore/Thumbulator.cxx
+++ b/src/emucore/Thumbulator.cxx
@@ -123,6 +123,8 @@ using Common::Base;
#define INC_ARM_CYCLES(m)
#endif
+//#define UNSAFE_OPTIMIZATIONS
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Thumbulator::Thumbulator(const uInt16* rom_ptr, uInt16* ram_ptr, uInt32 rom_size,
const uInt32 c_base, const uInt32 c_start, const uInt32 c_stack,
@@ -325,7 +327,7 @@ uInt32 Thumbulator::fetch16(uInt32 addr)
switch(addr & 0xF0000000)
{
- case 0x00000000: //ROM
+ case rom_base: //ROM
addr &= ROMADDMASK;
if(addr < 0x50)
fatalError("fetch16", addr, "abort");
@@ -334,7 +336,7 @@ uInt32 Thumbulator::fetch16(uInt32 addr)
DO_DBUG(statusMsg << "fetch16(" << Base::HEX8 << addr << ")=" << Base::HEX4 << data << endl);
return data;
- case 0x40000000: //RAM
+ case ram_base: //RAM
addr &= RAMADDMASK;
addr >>= 1;
data = CONV_RAMROM(ram[addr]);
@@ -353,7 +355,7 @@ uInt32 Thumbulator::fetch16(uInt32 addr)
void Thumbulator::write16(uInt32 addr, uInt32 data)
{
#ifndef UNSAFE_OPTIMIZATIONS
- if((addr > 0x40007fff) && (addr < 0x50000000))
+ if((addr > Thumbulator::ram_base + 0x7fff) && (addr < Thumbulator::ram_base + 0x10000000))
fatalError("write16", addr, "abort - out of range");
if (isProtected(addr)) fatalError("write16", addr, "to driver area");
@@ -369,7 +371,7 @@ void Thumbulator::write16(uInt32 addr, uInt32 data)
switch(addr & 0xF0000000)
{
- case 0x40000000: //RAM
+ case ram_base: //RAM
addr &= RAMADDMASK;
addr >>= 1;
ram[addr] = CONV_DATA(data);
@@ -531,7 +533,7 @@ void Thumbulator::write32(uInt32 addr, uInt32 data)
return;
#ifndef UNSAFE_OPTIMIZATIONS
- case 0x40000000: //RAM
+ case ram_base: //RAM
#else
default:
#endif
@@ -548,8 +550,8 @@ void Thumbulator::write32(uInt32 addr, uInt32 data)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Thumbulator::isProtected(uInt32 addr)
{
- if (addr < 0x40000000) return false;
- addr -= 0x40000000;
+ if (addr < ram_base) return false;
+ addr -= ram_base;
switch (configuration) {
case ConfigureFor::DPCplus:
@@ -578,9 +580,9 @@ uInt32 Thumbulator::read16(uInt32 addr)
{
uInt32 data;
#ifndef UNSAFE_OPTIMIZATIONS
- if((addr > 0x40007fff) && (addr < 0x50000000))
+ if((addr > Thumbulator::ram_base + 0x7fff) && (addr < Thumbulator::ram_base + 0x10000000))
fatalError("read16", addr, "abort - out of range");
- else if((addr > 0x0007ffff) && (addr < 0x10000000))
+ else if((addr > Thumbulator::rom_base + 0x0007ffff) && (addr < Thumbulator::rom_base + 0x10000000))
fatalError("read16", addr, "abort - out of range");
if(addr & 1)
fatalError("read16", addr, "abort - misaligned");
@@ -591,14 +593,16 @@ uInt32 Thumbulator::read16(uInt32 addr)
switch(addr & 0xF0000000)
{
- case 0x00000000: //ROM
+ //case 0x00000000: //ROM
+ case rom_base: //ROM
addr &= ROMADDMASK;
addr >>= 1;
data = CONV_RAMROM(rom[addr]);
DO_DBUG(statusMsg << "read16(" << Base::HEX8 << addr << ")=" << Base::HEX4 << data << endl);
return data;
- case 0x40000000: //RAM
+ //case 0x40000000: //RAM
+ case ram_base: //RAM
addr &= RAMADDMASK;
addr >>= 1;
data = CONV_RAMROM(ram[addr]);
@@ -633,8 +637,10 @@ uInt32 Thumbulator::read32(uInt32 addr)
uInt32 data;
switch(addr & 0xF0000000)
{
- case 0x00000000: //ROM
- case 0x40000000: //RAM
+ case rom_base: //ROM
+ //case 0x00000000: //ROM
+ case ram_base: //RAM
+ //case 0x40000000: //RAM
data = read16(addr+0);
data |= (uInt32(read16(addr+2))) << 16;
DO_DBUG(statusMsg << "read32(" << Base::HEX8 << addr << ")=" << Base::HEX8 << data << endl);
@@ -1061,8 +1067,9 @@ int Thumbulator::execute()
Op decodedOp;
#ifndef UNSAFE_OPTIMIZATIONS
- if ((instructionPtr & 0xF0000000) == 0 && instructionPtr < romSize)
- decodedOp = decodedRom[instructionPtr >> 1];
+ if ((instructionPtr & 0xF0000000) == rom_base
+ && instructionPtr >= rom_base && instructionPtr < rom_base + romSize)
+ decodedOp = decodedRom[(instructionPtr - rom_base) >> 1];
else
decodedOp = decodeInstructionWord(inst);
#else
@@ -1565,10 +1572,10 @@ int Thumbulator::execute()
// address to test for is + 4 due to pipelining
- #define BUS_SetNote (0x000006da + 4)
- #define BUS_ResetWave (0x000006de + 4)
- #define BUS_GetWavePtr (0x000006e2 + 4)
- #define BUS_SetWaveSize (0x000006e6 + 4)
+ #define BUS_SetNote (rom_base + 0x06da + 4)
+ #define BUS_ResetWave (rom_base + 0x06de + 4)
+ #define BUS_GetWavePtr (rom_base + 0x06e2 + 4)
+ #define BUS_SetWaveSize (rom_base + 0x06e6 + 4)
if (pc == BUS_SetNote)
{
@@ -1590,7 +1597,7 @@ int Thumbulator::execute()
myCartridge->thumbCallback(3, read_register(2), read_register(3));
handled = true;
}
- else if (pc == 0x0000083a)
+ else if (pc == Thumbulator::rom_base + 0x083a)
{
// exiting Custom ARM code, returning to BUS Driver control
}
@@ -1626,10 +1633,10 @@ int Thumbulator::execute()
// address to test for is + 4 due to pipelining
- #define CDF_SetNote (0x000006e2 + 4)
- #define CDF_ResetWave (0x000006e6 + 4)
- #define CDF_GetWavePtr (0x000006ea + 4)
- #define CDF_SetWaveSize (0x000006ee + 4)
+ #define CDF_SetNote (rom_base + 0x06e2 + 4)
+ #define CDF_ResetWave (rom_base + 0x06e6 + 4)
+ #define CDF_GetWavePtr (rom_base + 0x06ea + 4)
+ #define CDF_SetWaveSize (rom_base + 0x06ee + 4)
if (pc == CDF_SetNote)
{
@@ -1651,7 +1658,7 @@ int Thumbulator::execute()
myCartridge->thumbCallback(3, read_register(2), read_register(3));
handled = true;
}
- else if (pc == 0x0000083a)
+ else if (pc == Thumbulator::rom_base + 0x083a)
{
// exiting Custom ARM code, returning to CDF Driver control
}
@@ -1689,10 +1696,10 @@ int Thumbulator::execute()
// address to test for is + 4 due to pipelining
- #define CDF1_SetNote (0x00000752 + 4)
- #define CDF1_ResetWave (0x00000756 + 4)
- #define CDF1_GetWavePtr (0x0000075a + 4)
- #define CDF1_SetWaveSize (0x0000075e + 4)
+ #define CDF1_SetNote (rom_base + 0x0752 + 4)
+ #define CDF1_ResetWave (rom_base + 0x0756 + 4)
+ #define CDF1_GetWavePtr (rom_base + 0x075a + 4)
+ #define CDF1_SetWaveSize (rom_base + 0x075e + 4)
if (pc == CDF1_SetNote)
{
@@ -1730,7 +1737,7 @@ int Thumbulator::execute()
INC_ARM_CYCLES(2 + _flashCycles + 2); // ARM code ReturnC
handled = true;
}
- else if (pc == 0x0000083a)
+ else if (pc == Thumbulator::rom_base + 0x083a)
{
// exiting Custom ARM code, returning to CDFJ Driver control
}
@@ -2898,9 +2905,9 @@ int Thumbulator::reset()
cpsr = 0;
handler_mode = false;
- systick_ctrl = 0x00000004;
- systick_reload = 0x00000000;
- systick_count = 0x00000000;
+ systick_ctrl = rom_base + 0x0004; // TODO: not 100% sure about rom_base here
+ systick_reload = rom_base;
+ systick_count = rom_base;
systick_calibrate = 0x00ABCDEF;
// fxq: don't care about below so much (maybe to guess timing???)
diff --git a/src/emucore/Thumbulator.hxx b/src/emucore/Thumbulator.hxx
index cf60670a0..09336ec1c 100644
--- a/src/emucore/Thumbulator.hxx
+++ b/src/emucore/Thumbulator.hxx
@@ -34,6 +34,10 @@ class Cartridge;
#define UNSAFE_OPTIMIZATIONS
#endif
+// Note: This is still experimental, no guarantees!
+// TODO: make selectable from command line
+#define STM32F4 // compile for UnoCart/PlusCart using STM32F407xxx CPU
+
#define ROMADDMASK 0x7FFFF
#define RAMADDMASK 0x7FFF
@@ -95,6 +99,15 @@ class Thumbulator
uInt32 mamDataHits{0}, mamDataMisses{0};
#endif
};
+#ifndef STM32F4
+ // Harmony/Encore base adresses
+ static constexpr uInt32 ram_base = 0x40000000;
+ static constexpr uInt32 rom_base = 0x00000000;
+#else
+ // UnoCart/PlusCart base adresses (TODO!)
+ static constexpr uInt32 ram_base = 0x10000000;
+ static constexpr uInt32 rom_base = 0x20000000;
+#endif
Thumbulator(const uInt16* rom_ptr, uInt16* ram_ptr, uInt32 rom_size,
const uInt32 c_base, const uInt32 c_start, const uInt32 c_stack,
diff --git a/src/gui/FileListWidget.cxx b/src/gui/FileListWidget.cxx
index 954276580..efe911870 100644
--- a/src/gui/FileListWidget.cxx
+++ b/src/gui/FileListWidget.cxx
@@ -58,14 +58,9 @@ void FileListWidget::setDirectory(const FilesystemNode& node,
_history.clear();
while(tmp.hasParent())
{
- if(name.back() == FilesystemNode::PATH_SEPARATOR)
- name.pop_back();
- _history.push_back(HistoryType(tmp, name));
+ _history.push_back(HistoryType(tmp, fixPath(name)));
name = tmp.getName();
- if(name.back() == FilesystemNode::PATH_SEPARATOR)
- name.pop_back();
-
tmp = tmp.getParent();
}
// History is in reverse order; we need to fix that
@@ -191,14 +186,19 @@ void FileListWidget::selectParent()
string name = _node.getName();
FilesystemNode parent(_node.getParent());
- if(name.back() == FilesystemNode::PATH_SEPARATOR)
- name.pop_back();
_currentHistory->selected = selected().getName();
addHistory(parent);
- setLocation(parent, name);
+ setLocation(parent, fixPath(name));
}
}
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+void FileListWidget::selectHomeDir()
+{
+ while(hasPrevHistory())
+ selectPrevHistory();
+}
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FileListWidget::selectPrevHistory()
{
@@ -233,6 +233,17 @@ bool FileListWidget::hasNextHistory()
return _currentHistory != std::prev(_history.end(), 1);
}
+string& FileListWidget::fixPath(string& path)
+{
+ if(path.back() == FilesystemNode::PATH_SEPARATOR)
+ {
+ path.pop_back();
+ if(path.length() == 2 && path.back() == ':')
+ path.pop_back();
+ }
+ return path;
+}
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FileListWidget::addHistory(const FilesystemNode& node)
{
@@ -241,11 +252,9 @@ void FileListWidget::addHistory(const FilesystemNode& node)
_history.pop_back();
string select = selected().getName();
- if(select.back() == FilesystemNode::PATH_SEPARATOR)
- select.pop_back();
- _currentHistory->selected = select;
+ _currentHistory->selected = fixPath(select);
- _history.push_back(HistoryType(node, select));
+ _history.push_back(HistoryType(node, ".."));
_currentHistory = std::prev(_history.end(), 1);
//_historyIndex++;
}
diff --git a/src/gui/FileListWidget.hxx b/src/gui/FileListWidget.hxx
index 2c27507c7..f5047253a 100644
--- a/src/gui/FileListWidget.hxx
+++ b/src/gui/FileListWidget.hxx
@@ -45,7 +45,10 @@ class FileListWidget : public StringListWidget
public:
enum {
ItemChanged = 'FLic', // Entry in the list is changed (single-click, etc)
- ItemActivated = 'FLac' // Entry in the list is activated (double-click, etc)
+ ItemActivated = 'FLac', // Entry in the list is activated (double-click, etc)
+ kHomeDirCmd = 'homc', // go to Home directory
+ kPrevDirCmd = 'prvc', // go back in history to previous directory
+ kNextDirCmd = 'nxtc' // go back in history to next directory
};
using IconTypeFilter = std::function;
@@ -83,9 +86,11 @@ class FileListWidget : public StringListWidget
virtual void selectDirectory();
/** Select parent directory (if applicable) */
void selectParent();
+ /** Select to home directory */
+ void selectHomeDir();
/** Select previous directory in history (if applicable) */
void selectPrevHistory();
- /** Select next directory in history */
+ /** Select next directory in history (if applicable) */
void selectNextHistory();
/** Check if the there is a previous directory in history */
bool hasPrevHistory();
@@ -147,6 +152,7 @@ class FileListWidget : public StringListWidget
virtual const Icon* getIcon(int i) const;
int iconWidth() const;
virtual bool fullPathToolTip() const { return false; }
+ string& fixPath(string& path);
void addHistory(const FilesystemNode& node);
protected:
diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx
index 3425a548e..ed8da8231 100644
--- a/src/gui/LauncherDialog.cxx
+++ b/src/gui/LauncherDialog.cxx
@@ -228,25 +228,25 @@ void LauncherDialog::addPathWidgets(int& ypos, WidgetArray& wid)
const GUI::Icon& upIcon = smallIcon ? GUI::icon_up_small : GUI::icon_up_large;
myHomeButton = new ButtonWidget(this, _font, xpos, ypos,
- iconWidth + iconGap - 1, lineHeight + 2, homeIcon, kHomeDirCmd);
+ iconWidth + iconGap - 1, lineHeight + 2, homeIcon, FileListWidget::kHomeDirCmd);
myHomeButton->setToolTip("Go back to Stella's ROM directory.");
wid.push_back(myHomeButton);
xpos = myHomeButton->getRight() + BTN_GAP;
myPrevButton = new ButtonWidget(this, _font, xpos, ypos,
- iconWidth + iconGap - 1, lineHeight + 2, prevIcon, kPrevDirCmd);
+ iconWidth + iconGap - 1, lineHeight + 2, prevIcon, FileListWidget::kPrevDirCmd);
myPrevButton->setToolTip("Go back in directory history.");
wid.push_back(myPrevButton);
xpos = myPrevButton->getRight() + BTN_GAP;
myNextButton = new ButtonWidget(this, _font, xpos, ypos,
- iconWidth + iconGap - 1, lineHeight + 2, nextIcon, kNextDirCmd);
+ iconWidth + iconGap - 1, lineHeight + 2, nextIcon, FileListWidget::kNextDirCmd);
myNextButton->setToolTip("Go forward in directory history.");
wid.push_back(myNextButton);
xpos = myNextButton->getRight() + BTN_GAP;
myUpButton = new ButtonWidget(this, _font, xpos, ypos,
- iconWidth + iconGap - 1, lineHeight + 2, upIcon, kParentDirCmd);
+ iconWidth + iconGap - 1, lineHeight + 2, upIcon, ListWidget::kParentDirCmd);
myUpButton->setToolTip("Go Up");
wid.push_back(myUpButton);
xpos = myUpButton->getRight() + BTN_GAP;
@@ -358,7 +358,7 @@ void LauncherDialog::addButtonWidgets(int& ypos, WidgetArray& wid)
xpos += (buttonWidth + 0) / 4 + BUTTON_GAP;
myGoUpButton = new ButtonWidget(this, _font, xpos, ypos, (buttonWidth + 1) / 4, buttonHeight,
- "Go Up", kParentDirCmd);
+ "Go Up", ListWidget::kParentDirCmd);
wid.push_back(myGoUpButton);
xpos += (buttonWidth + 1) / 4 + BUTTON_GAP;
@@ -382,7 +382,7 @@ void LauncherDialog::addButtonWidgets(int& ypos, WidgetArray& wid)
xpos += (buttonWidth + 1) / 4 + BUTTON_GAP;
myGoUpButton = new ButtonWidget(this, _font, xpos, ypos, (buttonWidth + 2) / 4, buttonHeight,
- "Go Up", kParentDirCmd);
+ "Go Up", ListWidget::kParentDirCmd);
wid.push_back(myGoUpButton);
xpos += (buttonWidth + 2) / 4 + BUTTON_GAP;
@@ -774,7 +774,7 @@ void LauncherDialog::handleContextMenu()
else if(cmd == "subdirs")
sendCommand(kSubDirsCmd, 0, 0);
else if(cmd == "homedir")
- sendCommand(kHomeDirCmd, 0, 0);
+ sendCommand(FileListWidget::kHomeDirCmd, 0, 0);
else if(cmd == "highscores")
openHighScores();
else if(cmd == "reload")
@@ -818,19 +818,19 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
switch(key)
{
case KBDK_HOME:
- sendCommand(kHomeDirCmd, 0, 0);
+ sendCommand(FileListWidget::kHomeDirCmd, 0, 0);
break;
case KBDK_LEFT:
- sendCommand(kPrevDirCmd, 0, 0);
+ sendCommand(FileListWidget::kPrevDirCmd, 0, 0);
break;
case KBDK_RIGHT:
- sendCommand(kNextDirCmd, 0, 0);
+ sendCommand(FileListWidget::kNextDirCmd, 0, 0);
break;
case KBDK_UP:
- sendCommand(kParentDirCmd, 0, 0);
+ sendCommand(ListWidget::kParentDirCmd, 0, 0);
break;
case KBDK_DOWN:
@@ -1007,23 +1007,22 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
toggleSubDirs();
break;
- case kHomeDirCmd:
- gotoHomeDir();
+ case FileListWidget::kHomeDirCmd:
+ myList->selectHomeDir();
break;
- case kPrevDirCmd:
+ case FileListWidget::kPrevDirCmd:
myList->selectPrevHistory();
break;
- case kNextDirCmd:
+ case FileListWidget::kNextDirCmd:
myList->selectNextHistory();
break;
- case kParentDirCmd:
+ case ListWidget::kParentDirCmd:
myList->selectParent();
break;
-
case kLoadROMCmd:
if(myList->isDirectory(myList->selected()))
{
@@ -1314,13 +1313,6 @@ void LauncherDialog::openWhatsNew()
myDialog->open();
}
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void LauncherDialog::gotoHomeDir()
-{
- while(myList->hasPrevHistory())
- myList->selectPrevHistory();
-}
-
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void LauncherDialog::toggleShowAll(bool toggle)
{
diff --git a/src/gui/LauncherDialog.hxx b/src/gui/LauncherDialog.hxx
index 2a28dc9cc..2ae0521fe 100644
--- a/src/gui/LauncherDialog.hxx
+++ b/src/gui/LauncherDialog.hxx
@@ -174,7 +174,6 @@ class LauncherDialog : public Dialog, CommandSender
void showOnlyROMs(bool state);
void toggleShowAll(bool toggle = true);
void toggleSubDirs(bool toggle = true);
- void gotoHomeDir();
void handleContextMenu();
void handleQuit();
void toggleExtensions();
@@ -234,12 +233,8 @@ class LauncherDialog : public Dialog, CommandSender
enum {
kAllfilesCmd = 'lalf', // show all files (or ROMs only)
kSubDirsCmd = 'lred',
- kParentDirCmd = 'PARD',
kOptionsCmd = 'OPTI',
kQuitCmd = 'QUIT',
- kHomeDirCmd = 'homc', // go to Home directory
- kPrevDirCmd = 'prvc', // go back in history to previous directory
- kNextDirCmd = 'nxtc', // go back in history to next directory
kReloadCmd = 'relc',
kRmAllFav = 'rmaf',
kRmAllPop = 'rmap',