mirror of https://github.com/stella-emu/stella.git
Remove 'launcherroms' option, in the process fixing #851.
This commit is contained in:
parent
2e556fe6b6
commit
49fb4d01bb
|
@ -30,11 +30,11 @@
|
||||||
|
|
||||||
* Enhanced Kid Vid support to play tape audio.
|
* Enhanced Kid Vid support to play tape audio.
|
||||||
|
|
||||||
* Added port selection, used for controller default mapping
|
* Added port selection, used for controller default mapping.
|
||||||
|
|
||||||
* Added missing PlusROM support for E7 bankswitching.
|
* Added missing PlusROM support for E7 bankswitching.
|
||||||
|
|
||||||
* Acclerated emulation up to ~15% (ARM).
|
* Accelerated emulation up to ~15% (ARM).
|
||||||
|
|
||||||
* Added limited GameLine Master Module bankswitching support.
|
* Added limited GameLine Master Module bankswitching support.
|
||||||
|
|
||||||
|
@ -46,6 +46,8 @@
|
||||||
|
|
||||||
* Added user defined CPU cycle timers to debugger.
|
* Added user defined CPU cycle timers to debugger.
|
||||||
|
|
||||||
|
* Removed 'launcherroms' option, since it was causing some issues.
|
||||||
|
|
||||||
* For UNIX systems: Now defaults to using system-installed libsqlite3
|
* For UNIX systems: Now defaults to using system-installed libsqlite3
|
||||||
when available, and fixes delay on exiting app experienced on some
|
when available, and fixes delay on exiting app experienced on some
|
||||||
systems.
|
systems.
|
||||||
|
|
|
@ -3114,12 +3114,6 @@
|
||||||
<td>Enable bottom buttons in the ROM launcher.</td>
|
<td>Enable bottom buttons in the ROM launcher.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><pre>-launcherroms <1|0></pre></td>
|
|
||||||
<td>Specifies whether to show ROMs only (the default) or all
|
|
||||||
files in the ROM launcher.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-launcherextensions <1|0></pre></td>
|
<td><pre>-launcherextensions <1|0></pre></td>
|
||||||
<td>Display file extensions in the ROM launcher.</td>
|
<td>Display file extensions in the ROM launcher.</td>
|
||||||
|
|
|
@ -168,7 +168,6 @@ Settings::Settings()
|
||||||
setPermanent("launcherdisplay", 0);
|
setPermanent("launcherdisplay", 0);
|
||||||
setPermanent("launcherres", Common::Size(900, 600));
|
setPermanent("launcherres", Common::Size(900, 600));
|
||||||
setPermanent("launcherfont", "medium");
|
setPermanent("launcherfont", "medium");
|
||||||
setPermanent("launcherroms", "true");
|
|
||||||
setPermanent("launchersubdirs", "false");
|
setPermanent("launchersubdirs", "false");
|
||||||
setPermanent("launcherextensions", "false");
|
setPermanent("launcherextensions", "false");
|
||||||
setPermanent("launcherbuttons", "false");
|
setPermanent("launcherbuttons", "false");
|
||||||
|
@ -646,7 +645,6 @@ void Settings::usage()
|
||||||
<< " large16>\n"
|
<< " large16>\n"
|
||||||
<< " -romviewer <float> Show ROM info viewer at given zoom level in ROM\n"
|
<< " -romviewer <float> Show ROM info viewer at given zoom level in ROM\n"
|
||||||
<< " launcher (use 0 for off)\n"
|
<< " launcher (use 0 for off)\n"
|
||||||
<< " -launcherroms <1|0> Show only ROMs in the launcher (vs. all files)\n"
|
|
||||||
<< " -launchersubdirs <0|1> Show files from subdirectories too\n"
|
<< " -launchersubdirs <0|1> Show files from subdirectories too\n"
|
||||||
<< " -launcherextensions <0|1> Display file extensions in launcher\n"
|
<< " -launcherextensions <0|1> Display file extensions in launcher\n"
|
||||||
<< " -launcherbuttons <0|1> Display bottom buttons in launcher\n"
|
<< " -launcherbuttons <0|1> Display bottom buttons in launcher\n"
|
||||||
|
|
|
@ -92,12 +92,8 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
|
||||||
if(myUseMinimalUI) // Highlight 'Rom Listing'
|
if(myUseMinimalUI) // Highlight 'Rom Listing'
|
||||||
mySelectedItem = 0; // skip nothing
|
mySelectedItem = 0; // skip nothing
|
||||||
else
|
mySelectedItem = 9; // skip filter items and 6 navigation/help buttons
|
||||||
mySelectedItem = 10; // skip filter items and 6 navigation/help buttons
|
// FIXME: MAGIC NUMBER HERE!!!
|
||||||
|
|
||||||
// Do we show only ROMs or all files?
|
|
||||||
toggleShowAll(false);
|
|
||||||
|
|
||||||
applyFiltering();
|
applyFiltering();
|
||||||
setHelpAnchor("ROMInfo");
|
setHelpAnchor("ROMInfo");
|
||||||
}
|
}
|
||||||
|
@ -201,13 +197,6 @@ void LauncherDialog::addFilteringWidgets(int& ypos)
|
||||||
wid.push_back(myPattern);
|
wid.push_back(myPattern);
|
||||||
xpos = myPattern->getRight() + btnGap;
|
xpos = myPattern->getRight() + btnGap;
|
||||||
|
|
||||||
// Show the button for all files
|
|
||||||
myOnlyRomsButton = new ButtonWidget(this, _font, xpos, ypos - btnYOfs,
|
|
||||||
iconButtonWidth, buttonHeight, dummyIcon, kAllfilesCmd);
|
|
||||||
myOnlyRomsButton->setToolTip("Toggle file type filter (Ctrl+A)");
|
|
||||||
wid.push_back(myOnlyRomsButton);
|
|
||||||
xpos = myOnlyRomsButton->getRight() + btnGap;
|
|
||||||
|
|
||||||
// Show the subdirectories button
|
// Show the subdirectories button
|
||||||
mySubDirsButton = new ButtonWidget(this, _font, xpos, ypos - btnYOfs,
|
mySubDirsButton = new ButtonWidget(this, _font, xpos, ypos - btnYOfs,
|
||||||
iconButtonWidth, buttonHeight, dummyIcon, kSubDirsCmd);
|
iconButtonWidth, buttonHeight, dummyIcon, kSubDirsCmd);
|
||||||
|
@ -584,11 +573,10 @@ void LauncherDialog::applyFiltering()
|
||||||
myList->incProgress();
|
myList->incProgress();
|
||||||
if(!node.isDirectory())
|
if(!node.isDirectory())
|
||||||
{
|
{
|
||||||
// Do we want to show only ROMs or all files?
|
// Only show valid ROMs
|
||||||
string ext;
|
string ext;
|
||||||
if(myShowOnlyROMs &&
|
if(!Bankswitch::isValidRomName(node, ext) ||
|
||||||
(!Bankswitch::isValidRomName(node, ext)
|
BSPF::compareIgnoreCase(ext, "zip") == 0) // exclude ZIPs without any valid ROMs
|
||||||
|| BSPF::compareIgnoreCase(ext, "zip") == 0)) // exclude ZIPs without any valid ROMs
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Skip over files that don't match the pattern in the 'pattern' textbox
|
// Skip over files that don't match the pattern in the 'pattern' textbox
|
||||||
|
@ -769,8 +757,6 @@ void LauncherDialog::handleContextMenu()
|
||||||
toggleExtensions();
|
toggleExtensions();
|
||||||
else if(cmd == "sorting")
|
else if(cmd == "sorting")
|
||||||
toggleSorting();
|
toggleSorting();
|
||||||
else if(cmd == "showall")
|
|
||||||
sendCommand(kAllfilesCmd, 0, 0);
|
|
||||||
else if(cmd == "subdirs")
|
else if(cmd == "subdirs")
|
||||||
sendCommand(kSubDirsCmd, 0, 0);
|
sendCommand(kSubDirsCmd, 0, 0);
|
||||||
else if(cmd == "homedir")
|
else if(cmd == "homedir")
|
||||||
|
@ -793,13 +779,6 @@ ContextMenu& LauncherDialog::contextMenu()
|
||||||
return *myContextMenu;
|
return *myContextMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void LauncherDialog::showOnlyROMs(bool state)
|
|
||||||
{
|
|
||||||
myShowOnlyROMs = state;
|
|
||||||
instance().settings().setValue("launcherroms", state);
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
||||||
{
|
{
|
||||||
|
@ -814,10 +793,6 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
||||||
handled = true;
|
handled = true;
|
||||||
switch(key)
|
switch(key)
|
||||||
{
|
{
|
||||||
case KBDK_A:
|
|
||||||
sendCommand(kAllfilesCmd, 0, 0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case KBDK_D:
|
case KBDK_D:
|
||||||
sendCommand(kSubDirsCmd, 0, 0);
|
sendCommand(kSubDirsCmd, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
@ -988,10 +963,6 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
{
|
{
|
||||||
switch(cmd)
|
switch(cmd)
|
||||||
{
|
{
|
||||||
case kAllfilesCmd:
|
|
||||||
toggleShowAll();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kSubDirsCmd:
|
case kSubDirsCmd:
|
||||||
toggleSubDirs();
|
toggleSubDirs();
|
||||||
break;
|
break;
|
||||||
|
@ -1195,9 +1166,6 @@ void LauncherDialog::openContextMenu(int x, int y)
|
||||||
items.emplace_back(instance().settings().getBool("launchersubdirs")
|
items.emplace_back(instance().settings().getBool("launchersubdirs")
|
||||||
? "Exclude subdirectories"
|
? "Exclude subdirectories"
|
||||||
: "Include subdirectories", "subdirs");
|
: "Include subdirectories", "subdirs");
|
||||||
items.emplace_back(instance().settings().getBool("launcherroms")
|
|
||||||
? "Show all files"
|
|
||||||
: "Show only ROMs", "showall");
|
|
||||||
#endif
|
#endif
|
||||||
items.emplace_back("Go to initial directory", "homedir");
|
items.emplace_back("Go to initial directory", "homedir");
|
||||||
items.emplace_back("Go to parent directory", "prevdir");
|
items.emplace_back("Go to parent directory", "prevdir");
|
||||||
|
@ -1304,31 +1272,6 @@ void LauncherDialog::openWhatsNew()
|
||||||
myDialog->open();
|
myDialog->open();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void LauncherDialog::toggleShowAll(bool toggle)
|
|
||||||
{
|
|
||||||
myShowOnlyROMs = instance().settings().getBool("launcherroms");
|
|
||||||
|
|
||||||
if(toggle)
|
|
||||||
{
|
|
||||||
myShowOnlyROMs = !myShowOnlyROMs;
|
|
||||||
instance().settings().setValue("launcherroms", myShowOnlyROMs);
|
|
||||||
//myAllFilesButton->setBitmap();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(myOnlyRomsButton)
|
|
||||||
{
|
|
||||||
const bool smallIcon = Dialog::lineHeight() < 26;
|
|
||||||
const GUI::Icon& onlyromsIcon = myShowOnlyROMs
|
|
||||||
? smallIcon ? GUI::icon_onlyroms_small_on : GUI::icon_onlyroms_large_on
|
|
||||||
: smallIcon ? GUI::icon_onlyroms_small_off : GUI::icon_onlyroms_large_off;
|
|
||||||
|
|
||||||
myOnlyRomsButton->setIcon(onlyromsIcon);
|
|
||||||
}
|
|
||||||
if(toggle)
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void LauncherDialog::toggleSubDirs(bool toggle)
|
void LauncherDialog::toggleSubDirs(bool toggle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -155,8 +155,6 @@ class LauncherDialog : public Dialog, CommandSender
|
||||||
void openGlobalProps();
|
void openGlobalProps();
|
||||||
void openHighScores();
|
void openHighScores();
|
||||||
void openWhatsNew();
|
void openWhatsNew();
|
||||||
void showOnlyROMs(bool state);
|
|
||||||
void toggleShowAll(bool toggle = true);
|
|
||||||
void toggleSubDirs(bool toggle = true);
|
void toggleSubDirs(bool toggle = true);
|
||||||
void handleContextMenu();
|
void handleContextMenu();
|
||||||
void handleQuit();
|
void handleQuit();
|
||||||
|
@ -179,7 +177,6 @@ class LauncherDialog : public Dialog, CommandSender
|
||||||
|
|
||||||
ButtonWidget* mySettingsButton{nullptr};
|
ButtonWidget* mySettingsButton{nullptr};
|
||||||
EditTextWidget* myPattern{nullptr};
|
EditTextWidget* myPattern{nullptr};
|
||||||
ButtonWidget* myOnlyRomsButton{nullptr};
|
|
||||||
ButtonWidget* mySubDirsButton{nullptr};
|
ButtonWidget* mySubDirsButton{nullptr};
|
||||||
StaticTextWidget* myRomCount{nullptr};
|
StaticTextWidget* myRomCount{nullptr};
|
||||||
ButtonWidget* myHelpButton{nullptr};
|
ButtonWidget* myHelpButton{nullptr};
|
||||||
|
@ -204,7 +201,6 @@ class LauncherDialog : public Dialog, CommandSender
|
||||||
|
|
||||||
int mySelectedItem{0};
|
int mySelectedItem{0};
|
||||||
|
|
||||||
bool myShowOnlyROMs{false};
|
|
||||||
bool myUseMinimalUI{false};
|
bool myUseMinimalUI{false};
|
||||||
bool myEventHandled{false};
|
bool myEventHandled{false};
|
||||||
bool myShortCount{false};
|
bool myShortCount{false};
|
||||||
|
@ -214,7 +210,6 @@ class LauncherDialog : public Dialog, CommandSender
|
||||||
uInt64 myRomInfoTime{0};
|
uInt64 myRomInfoTime{0};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
kAllfilesCmd = 'lalf', // show all files (or ROMs only)
|
|
||||||
kSubDirsCmd = 'lred',
|
kSubDirsCmd = 'lred',
|
||||||
kOptionsCmd = 'OPTI',
|
kOptionsCmd = 'OPTI',
|
||||||
kQuitCmd = 'QUIT',
|
kQuitCmd = 'QUIT',
|
||||||
|
|
Loading…
Reference in New Issue