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.
|
||||
|
||||
* Added port selection, used for controller default mapping
|
||||
* Added port selection, used for controller default mapping.
|
||||
|
||||
* 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.
|
||||
|
||||
|
@ -46,6 +46,8 @@
|
|||
|
||||
* 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
|
||||
when available, and fixes delay on exiting app experienced on some
|
||||
systems.
|
||||
|
|
|
@ -3114,12 +3114,6 @@
|
|||
<td>Enable bottom buttons in the ROM launcher.</td>
|
||||
</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>
|
||||
<td><pre>-launcherextensions <1|0></pre></td>
|
||||
<td>Display file extensions in the ROM launcher.</td>
|
||||
|
|
|
@ -168,7 +168,6 @@ Settings::Settings()
|
|||
setPermanent("launcherdisplay", 0);
|
||||
setPermanent("launcherres", Common::Size(900, 600));
|
||||
setPermanent("launcherfont", "medium");
|
||||
setPermanent("launcherroms", "true");
|
||||
setPermanent("launchersubdirs", "false");
|
||||
setPermanent("launcherextensions", "false");
|
||||
setPermanent("launcherbuttons", "false");
|
||||
|
@ -646,7 +645,6 @@ void Settings::usage()
|
|||
<< " large16>\n"
|
||||
<< " -romviewer <float> Show ROM info viewer at given zoom level in ROM\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"
|
||||
<< " -launcherextensions <0|1> Display file extensions 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'
|
||||
mySelectedItem = 0; // skip nothing
|
||||
else
|
||||
mySelectedItem = 10; // skip filter items and 6 navigation/help buttons
|
||||
|
||||
// Do we show only ROMs or all files?
|
||||
toggleShowAll(false);
|
||||
|
||||
mySelectedItem = 9; // skip filter items and 6 navigation/help buttons
|
||||
// FIXME: MAGIC NUMBER HERE!!!
|
||||
applyFiltering();
|
||||
setHelpAnchor("ROMInfo");
|
||||
}
|
||||
|
@ -201,13 +197,6 @@ void LauncherDialog::addFilteringWidgets(int& ypos)
|
|||
wid.push_back(myPattern);
|
||||
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
|
||||
mySubDirsButton = new ButtonWidget(this, _font, xpos, ypos - btnYOfs,
|
||||
iconButtonWidth, buttonHeight, dummyIcon, kSubDirsCmd);
|
||||
|
@ -584,11 +573,10 @@ void LauncherDialog::applyFiltering()
|
|||
myList->incProgress();
|
||||
if(!node.isDirectory())
|
||||
{
|
||||
// Do we want to show only ROMs or all files?
|
||||
// Only show valid ROMs
|
||||
string ext;
|
||||
if(myShowOnlyROMs &&
|
||||
(!Bankswitch::isValidRomName(node, ext)
|
||||
|| BSPF::compareIgnoreCase(ext, "zip") == 0)) // exclude ZIPs without any valid ROMs
|
||||
if(!Bankswitch::isValidRomName(node, ext) ||
|
||||
BSPF::compareIgnoreCase(ext, "zip") == 0) // exclude ZIPs without any valid ROMs
|
||||
return false;
|
||||
|
||||
// Skip over files that don't match the pattern in the 'pattern' textbox
|
||||
|
@ -769,8 +757,6 @@ void LauncherDialog::handleContextMenu()
|
|||
toggleExtensions();
|
||||
else if(cmd == "sorting")
|
||||
toggleSorting();
|
||||
else if(cmd == "showall")
|
||||
sendCommand(kAllfilesCmd, 0, 0);
|
||||
else if(cmd == "subdirs")
|
||||
sendCommand(kSubDirsCmd, 0, 0);
|
||||
else if(cmd == "homedir")
|
||||
|
@ -793,13 +779,6 @@ ContextMenu& LauncherDialog::contextMenu()
|
|||
return *myContextMenu;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void LauncherDialog::showOnlyROMs(bool state)
|
||||
{
|
||||
myShowOnlyROMs = state;
|
||||
instance().settings().setValue("launcherroms", state);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
||||
{
|
||||
|
@ -814,10 +793,6 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
|||
handled = true;
|
||||
switch(key)
|
||||
{
|
||||
case KBDK_A:
|
||||
sendCommand(kAllfilesCmd, 0, 0);
|
||||
break;
|
||||
|
||||
case KBDK_D:
|
||||
sendCommand(kSubDirsCmd, 0, 0);
|
||||
break;
|
||||
|
@ -988,10 +963,6 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
|||
{
|
||||
switch(cmd)
|
||||
{
|
||||
case kAllfilesCmd:
|
||||
toggleShowAll();
|
||||
break;
|
||||
|
||||
case kSubDirsCmd:
|
||||
toggleSubDirs();
|
||||
break;
|
||||
|
@ -1195,9 +1166,6 @@ void LauncherDialog::openContextMenu(int x, int y)
|
|||
items.emplace_back(instance().settings().getBool("launchersubdirs")
|
||||
? "Exclude subdirectories"
|
||||
: "Include subdirectories", "subdirs");
|
||||
items.emplace_back(instance().settings().getBool("launcherroms")
|
||||
? "Show all files"
|
||||
: "Show only ROMs", "showall");
|
||||
#endif
|
||||
items.emplace_back("Go to initial directory", "homedir");
|
||||
items.emplace_back("Go to parent directory", "prevdir");
|
||||
|
@ -1304,31 +1272,6 @@ void LauncherDialog::openWhatsNew()
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -155,8 +155,6 @@ class LauncherDialog : public Dialog, CommandSender
|
|||
void openGlobalProps();
|
||||
void openHighScores();
|
||||
void openWhatsNew();
|
||||
void showOnlyROMs(bool state);
|
||||
void toggleShowAll(bool toggle = true);
|
||||
void toggleSubDirs(bool toggle = true);
|
||||
void handleContextMenu();
|
||||
void handleQuit();
|
||||
|
@ -179,7 +177,6 @@ class LauncherDialog : public Dialog, CommandSender
|
|||
|
||||
ButtonWidget* mySettingsButton{nullptr};
|
||||
EditTextWidget* myPattern{nullptr};
|
||||
ButtonWidget* myOnlyRomsButton{nullptr};
|
||||
ButtonWidget* mySubDirsButton{nullptr};
|
||||
StaticTextWidget* myRomCount{nullptr};
|
||||
ButtonWidget* myHelpButton{nullptr};
|
||||
|
@ -204,7 +201,6 @@ class LauncherDialog : public Dialog, CommandSender
|
|||
|
||||
int mySelectedItem{0};
|
||||
|
||||
bool myShowOnlyROMs{false};
|
||||
bool myUseMinimalUI{false};
|
||||
bool myEventHandled{false};
|
||||
bool myShortCount{false};
|
||||
|
@ -214,7 +210,6 @@ class LauncherDialog : public Dialog, CommandSender
|
|||
uInt64 myRomInfoTime{0};
|
||||
|
||||
enum {
|
||||
kAllfilesCmd = 'lalf', // show all files (or ROMs only)
|
||||
kSubDirsCmd = 'lred',
|
||||
kOptionsCmd = 'OPTI',
|
||||
kQuitCmd = 'QUIT',
|
||||
|
|
Loading…
Reference in New Issue