minor fix, make sure that a message is displayed when switching TV format

This commit is contained in:
thrust26 2020-05-16 23:47:15 +02:00
parent 77ac37e706
commit 63f1414007
4 changed files with 7 additions and 4 deletions

View File

@ -373,7 +373,7 @@ void Console::setFormat(uInt32 format, bool force)
{ {
case 0: // auto-detect case 0: // auto-detect
{ {
if (myFormatAutodetected) return; if (!force && myFormatAutodetected) return;
myDisplayFormat = formatFromFilename(); myDisplayFormat = formatFromFilename();
if (myDisplayFormat == "AUTO") if (myDisplayFormat == "AUTO")

View File

@ -456,6 +456,9 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
// Get (and display) the previous|next adjustment function, // Get (and display) the previous|next adjustment function,
// but do not change its value // but do not change its value
cycleAdjustSetting(adjustActive ? direction : 0)(0); cycleAdjustSetting(adjustActive ? direction : 0)(0);
// Fallback message when no message is displayed by method
//if(!myOSystem.frameBuffer().messageShown())
// myOSystem.frameBuffer().showMessage("Message " + std::to_string(int(myAdjustSetting)));
myAdjustActive = true; myAdjustActive = true;
} }
break; break;

View File

@ -311,11 +311,11 @@ void VideoAudioDialog::addTVEffectsTab()
CREATE_CUSTOM_SLIDERS(ScanIntense, "Intensity", kScanlinesChanged) CREATE_CUSTOM_SLIDERS(ScanIntense, "Intensity", kScanlinesChanged)
// Create buttons in 2nd column // Create buttons in 2nd column
xpos = myTVSharp->getRight() + fontWidth * 2; int cloneWidth = _font.getStringWidth("Clone Bad Adjust") + fontWidth * 2.5;
xpos = _w - HBORDER - 2 * 2 - cloneWidth;
ypos = VBORDER - VGAP / 2; ypos = VBORDER - VGAP / 2;
// Adjustable presets // Adjustable presets
int cloneWidth = _font.getStringWidth("Clone Bad Adjust") + fontWidth * 2.5;
#define CREATE_CLONE_BUTTON(obj, desc) \ #define CREATE_CLONE_BUTTON(obj, desc) \
myClone ## obj = \ myClone ## obj = \
new ButtonWidget(myTab, _font, xpos, ypos, cloneWidth, buttonHeight,\ new ButtonWidget(myTab, _font, xpos, ypos, cloneWidth, buttonHeight,\