diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 3d2bdbd3d..b130e8ab7 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -2847,7 +2847,9 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { { { Event::ExitMode, "Exit current Stella menu/mode" }, { Event::OptionsMenuMode, "Enter Options menu UI" }, { Event::CmdMenuMode, "Toggle Commands menu UI" }, +#ifdef IMAGE_SUPPORT { Event::ToggleBezel, "Toggle bezel display" }, +#endif { Event::HighScoresMenuMode, "Toggle High Scores UI" }, { Event::PlusRomsSetupMode, "Toggle PlusROMs setup UI" }, { Event::TogglePauseMode, "Toggle Pause mode" }, diff --git a/src/emucore/EventHandler.hxx b/src/emucore/EventHandler.hxx index 34beeb36b..f81b9cb1e 100644 --- a/src/emucore/EventHandler.hxx +++ b/src/emucore/EventHandler.hxx @@ -531,7 +531,7 @@ class EventHandler COMBO_SIZE = 16, EVENTS_PER_COMBO = 8, #ifdef IMAGE_SUPPORT - PNG_SIZE = 3, + PNG_SIZE = 4, #else PNG_SIZE = 0, #endif @@ -540,7 +540,7 @@ class EventHandler #else REFRESH_SIZE = 0, #endif - EMUL_ACTIONLIST_SIZE = 235 + PNG_SIZE + COMBO_SIZE + REFRESH_SIZE, + EMUL_ACTIONLIST_SIZE = 234 + PNG_SIZE + COMBO_SIZE + REFRESH_SIZE, MENU_ACTIONLIST_SIZE = 20 ; diff --git a/src/gui/GameInfoDialog.cxx b/src/gui/GameInfoDialog.cxx index 35d2f836d..c7c7e0aef 100644 --- a/src/gui/GameInfoDialog.cxx +++ b/src/gui/GameInfoDialog.cxx @@ -421,7 +421,6 @@ void GameInfoDialog::addControllersTab() void GameInfoDialog::addCartridgeTab() { // 4) Cartridge properties - const GUI::Font& ifont = instance().frameBuffer().infoFont(); const int lineHeight = Dialog::lineHeight(), fontHeight = Dialog::fontHeight(), VBORDER = Dialog::vBorder(), @@ -485,6 +484,9 @@ void GameInfoDialog::addCartridgeTab() bw, myUrl->getHeight(), ">>", kLinkPressed); wid.push_back(myUrlButton); +#ifdef IMAGE_SUPPORT + const GUI::Font& ifont = instance().frameBuffer().infoFont(); + ypos += lineHeight + VGAP; new StaticTextWidget(myTab, _font, xpos, ypos + 1, lwidth, fontHeight, "Bezelname"); myBezelName = new EditTextWidget(myTab, _font, xpos + lwidth, ypos - 1, @@ -499,6 +501,7 @@ void GameInfoDialog::addCartridgeTab() ypos += lineHeight + VGAP; myBezelDetected = new StaticTextWidget(myTab, ifont, xpos + lwidth, ypos, "'1234567890123456789012345678901234567' selected"); +#endif // Add items for tab 3 addToFocusList(wid, myTab, tabID); @@ -894,6 +897,7 @@ void GameInfoDialog::loadCartridgeProperties(const Properties& props) myNote->setText(props.get(PropType::Cart_Note)); myUrl->setText(props.get(PropType::Cart_Url)); +#ifdef IMAGE_SUPPORT bool autoSelected = false; string bezelName = props.get(PropType::Bezel_Name); if(bezelName.empty()) @@ -910,6 +914,7 @@ void GameInfoDialog::loadCartridgeProperties(const Properties& props) myBezelDetected->setLabel("auto-selected"); else myBezelDetected->setLabel(""); +#endif updateLink(); } @@ -1026,11 +1031,13 @@ void GameInfoDialog::saveProperties() myGameProperties.set(PropType::Cart_Rarity, myRarity->getText()); myGameProperties.set(PropType::Cart_Note, myNote->getText()); myGameProperties.set(PropType::Cart_Url, myUrl->getText()); +#ifdef IMAGE_SUPPORT // avoid saving auto-selected bezel names: if(myBezelName->getText() == Bezel::getName(instance().bezelDir().getPath(), myGameProperties)) myGameProperties.reset(PropType::Bezel_Name); else myGameProperties.set(PropType::Bezel_Name, myBezelName->getText()); +#endif } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1616,6 +1623,7 @@ void GameInfoDialog::handleCommand(CommandSender* sender, int cmd, MediaFactory::openURL(myUrl->getText()); break; +#ifdef IMAGE_SUPPORT case kBezelFilePressed: BrowserDialog::show(this, _font, "Select bezel image", instance().bezelDir().getPath() + myBezelName->getText(), @@ -1631,6 +1639,7 @@ void GameInfoDialog::handleCommand(CommandSender* sender, int cmd, return BSPF::endsWithIgnoreCase(node.getName(), ".png"); }); break; +#endif case EditTextWidget::kChangedCmd: if(id == kLinkId) diff --git a/src/gui/RomInfoWidget.cxx b/src/gui/RomInfoWidget.cxx index ae64bb6e7..894e7b1b1 100644 --- a/src/gui/RomInfoWidget.cxx +++ b/src/gui/RomInfoWidget.cxx @@ -166,7 +166,7 @@ void RomInfoWidget::parseProperties(const FSNode& node, bool full) + (isPlusCart ? " - PlusROM" : "") + buf.str()); } -#ifdef DEBUG_BUILD +#if DEBUG_BUILD && IMAGE_SUPPORT // Debug bezel properties: if(myProperties.get(PropType::Bezel_Name).empty()) myRomInfo.push_back("*Bezel: " + Bezel::getName(instance().bezelDir().getPath(), myProperties)); diff --git a/src/gui/VideoAudioDialog.cxx b/src/gui/VideoAudioDialog.cxx index afe0f4dcc..6dabd98de 100644 --- a/src/gui/VideoAudioDialog.cxx +++ b/src/gui/VideoAudioDialog.cxx @@ -78,7 +78,9 @@ VideoAudioDialog::VideoAudioDialog(OSystem& osystem, DialogContainer& parent, addDisplayTab(); addPaletteTab(); addTVEffectsTab(); +#ifdef IMAGE_SUPPORT addBezelTab(); +#endif addAudioTab(); // Add Defaults, OK and Cancel buttons @@ -770,6 +772,7 @@ void VideoAudioDialog::loadConfig() myTVScanMask->setSelected(settings.getString("tv.scanmask"), TIASurface::SETTING_STANDARD); ///////////////////////////////////////////////////////////////////////////// +#ifdef IMAGE_SUPPORT // Bezel tab myBezelEnableCheckbox->setState(settings.getBool("bezel.show")); myBezelPath->setText(settings.getString("bezel.dir")); @@ -780,6 +783,7 @@ void VideoAudioDialog::loadConfig() myWinTopSlider->setValue(settings.getInt("bezel.win.top")); myWinBottomSlider->setValue(settings.getInt("bezel.win.bottom")); handleBezelChange(); +#endif ///////////////////////////////////////////////////////////////////////////// // Audio tab @@ -905,6 +909,7 @@ void VideoAudioDialog::saveConfig() settings.setValue("tv.scanmask", myTVScanMask->getSelectedTag()); ///////////////////////////////////////////////////////////////////////////// +#ifdef IMAGE_SUPPORT // Bezel tab settings.setValue("bezel.show", myBezelEnableCheckbox->getState()); settings.setValue("bezel.dir", myBezelPath->getText()); @@ -914,6 +919,7 @@ void VideoAudioDialog::saveConfig() settings.setValue("bezel.win.right", myWinRightSlider->getValueLabel()); settings.setValue("bezel.win.top", myWinTopSlider->getValueLabel()); settings.setValue("bezel.win.bottom", myWinBottomSlider->getValueLabel()); +#endif // Note: The following has to happen after all video related setting have been saved if(instance().hasConsole()) @@ -1050,6 +1056,7 @@ void VideoAudioDialog::setDefaults() break; } case 3: // Bezels +#ifdef IMAGE_SUPPORT myBezelEnableCheckbox->setState(true); myBezelPath->setText(instance().userDir().getShortPath()); myBezelShowWindowed->setState(false); @@ -1058,6 +1065,7 @@ void VideoAudioDialog::setDefaults() break; case 4: // Audio +#endif mySoundEnableCheckbox->setState(AudioSettings::DEFAULT_ENABLED); myVolumeSlider->setValue(AudioSettings::DEFAULT_VOLUME); myDevicePopup->setSelected(AudioSettings::DEFAULT_DEVICE);