mirror of https://github.com/stella-emu/stella.git
refactored Video and Audio dialogs into common dialog
created new EmulationDialog (re)moved some includes to reduce compile time
This commit is contained in:
parent
614e28375d
commit
259c0bf48f
|
@ -19,7 +19,6 @@
|
||||||
#define CART_DEBUG_WIDGET_HXX
|
#define CART_DEBUG_WIDGET_HXX
|
||||||
|
|
||||||
class GuiObject;
|
class GuiObject;
|
||||||
class ButtonWidget;
|
|
||||||
class StringListWidget;
|
class StringListWidget;
|
||||||
|
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
@ -29,8 +28,6 @@ namespace GUI {
|
||||||
#include "Base.hxx" // not needed here, but all child classes need it
|
#include "Base.hxx" // not needed here, but all child classes need it
|
||||||
#include "Command.hxx"
|
#include "Command.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "Debugger.hxx"
|
|
||||||
#include "CartDebug.hxx"
|
|
||||||
|
|
||||||
class CartDebugWidget : public Widget, public CommandSender
|
class CartDebugWidget : public Widget, public CommandSender
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
|
|
||||||
#include "PopUpWidget.hxx"
|
#include "PopUpWidget.hxx"
|
||||||
|
#include "Debugger.hxx"
|
||||||
|
#include "CartDebug.hxx"
|
||||||
#include "CartEnhanced.hxx"
|
#include "CartEnhanced.hxx"
|
||||||
#include "CartEnhancedWidget.hxx"
|
#include "CartEnhancedWidget.hxx"
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ class TiaOutputWidget;
|
||||||
class TiaZoomWidget;
|
class TiaZoomWidget;
|
||||||
class CartDebugWidget;
|
class CartDebugWidget;
|
||||||
class CartRamWidget;
|
class CartRamWidget;
|
||||||
|
class OptionsDialog;
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
struct Rect;
|
struct Rect;
|
||||||
|
@ -40,7 +41,6 @@ namespace Common {
|
||||||
|
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "MessageBox.hxx"
|
#include "MessageBox.hxx"
|
||||||
#include "OptionsDialog.hxx"
|
|
||||||
|
|
||||||
class DebuggerDialog : public Dialog
|
class DebuggerDialog : public Dialog
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@ class AudioSettings;
|
||||||
class Menu;
|
class Menu;
|
||||||
class MessageMenu;
|
class MessageMenu;
|
||||||
class TimeMachine;
|
class TimeMachine;
|
||||||
class VideoDialog;
|
class VideoAudioDialog;
|
||||||
#endif
|
#endif
|
||||||
#ifdef PNG_SUPPORT
|
#ifdef PNG_SUPPORT
|
||||||
class PNGLibrary;
|
class PNGLibrary;
|
||||||
|
|
|
@ -1,353 +0,0 @@
|
||||||
//============================================================================
|
|
||||||
//
|
|
||||||
// SSSS tt lll lll
|
|
||||||
// SS SS tt ll ll
|
|
||||||
// SS tttttt eeee ll ll aaaa
|
|
||||||
// SSSS tt ee ee ll ll aa
|
|
||||||
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
||||||
// SS SS tt ee ll ll aa aa
|
|
||||||
// SSSS ttt eeeee llll llll aaaaa
|
|
||||||
//
|
|
||||||
// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony
|
|
||||||
// and the Stella Team
|
|
||||||
//
|
|
||||||
// See the file "License.txt" for information on usage and redistribution of
|
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
||||||
//============================================================================
|
|
||||||
|
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
|
||||||
|
|
||||||
#include "Console.hxx"
|
|
||||||
#include "Cart.hxx"
|
|
||||||
#include "CartDPC.hxx"
|
|
||||||
#include "Control.hxx"
|
|
||||||
#include "Dialog.hxx"
|
|
||||||
#include "Font.hxx"
|
|
||||||
#include "Menu.hxx"
|
|
||||||
#include "OSystem.hxx"
|
|
||||||
#include "PopUpWidget.hxx"
|
|
||||||
#include "Settings.hxx"
|
|
||||||
#include "Sound.hxx"
|
|
||||||
#include "Widget.hxx"
|
|
||||||
#include "AudioSettings.hxx"
|
|
||||||
|
|
||||||
#include "AudioDialog.hxx"
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
|
|
||||||
const GUI::Font& font)
|
|
||||||
: Dialog(osystem, parent, font, "Audio settings")
|
|
||||||
{
|
|
||||||
const int lineHeight = font.getLineHeight(),
|
|
||||||
fontHeight = font.getFontHeight(),
|
|
||||||
fontWidth = font.getMaxCharWidth();
|
|
||||||
const int VBORDER = fontHeight / 2;
|
|
||||||
const int HBORDER = fontWidth * 1.25;
|
|
||||||
const int INDENT = fontWidth * 2;
|
|
||||||
const int VGAP = fontHeight / 4;
|
|
||||||
|
|
||||||
int xpos, ypos;
|
|
||||||
int lwidth = font.getStringWidth("Volume "),
|
|
||||||
pwidth;
|
|
||||||
|
|
||||||
WidgetArray wid;
|
|
||||||
VariantList items;
|
|
||||||
|
|
||||||
// Set real dimensions
|
|
||||||
_w = 48 * fontWidth + HBORDER * 2;
|
|
||||||
_h = 12 * (lineHeight + VGAP) + VBORDER + _th;
|
|
||||||
|
|
||||||
xpos = HBORDER; ypos = VBORDER + _th;
|
|
||||||
|
|
||||||
// Enable sound
|
|
||||||
mySoundEnableCheckbox = new CheckboxWidget(this, font, xpos, ypos,
|
|
||||||
"Enable sound", kSoundEnableChanged);
|
|
||||||
wid.push_back(mySoundEnableCheckbox);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
xpos += CheckboxWidget::prefixSize(font);
|
|
||||||
|
|
||||||
// Volume
|
|
||||||
myVolumeSlider = new SliderWidget(this, font, xpos, ypos,
|
|
||||||
"Volume", lwidth, 0, 4 * fontWidth, "%");
|
|
||||||
myVolumeSlider->setMinValue(1); myVolumeSlider->setMaxValue(100);
|
|
||||||
myVolumeSlider->setTickmarkIntervals(4);
|
|
||||||
wid.push_back(myVolumeSlider);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Mode
|
|
||||||
items.clear();
|
|
||||||
VarList::push_back(items, "Low quality, medium lag", static_cast<int>(AudioSettings::Preset::lowQualityMediumLag));
|
|
||||||
VarList::push_back(items, "High quality, medium lag", static_cast<int>(AudioSettings::Preset::highQualityMediumLag));
|
|
||||||
VarList::push_back(items, "High quality, low lag", static_cast<int>(AudioSettings::Preset::highQualityLowLag));
|
|
||||||
VarList::push_back(items, "Ultra quality, minimal lag", static_cast<int>(AudioSettings::Preset::ultraQualityMinimalLag));
|
|
||||||
VarList::push_back(items, "Custom", static_cast<int>(AudioSettings::Preset::custom));
|
|
||||||
myModePopup = new PopUpWidget(this, font, xpos, ypos,
|
|
||||||
font.getStringWidth("Ultry quality, minimal lag"), lineHeight,
|
|
||||||
items, "Mode", lwidth, kModeChanged);
|
|
||||||
wid.push_back(myModePopup);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
xpos += INDENT;
|
|
||||||
|
|
||||||
// Fragment size
|
|
||||||
pwidth = font.getStringWidth("512 samples") + 7;
|
|
||||||
lwidth = font.getStringWidth("Resampling quality ");
|
|
||||||
items.clear();
|
|
||||||
VarList::push_back(items, "128 samples", 128);
|
|
||||||
VarList::push_back(items, "256 samples", 256);
|
|
||||||
VarList::push_back(items, "512 samples", 512);
|
|
||||||
VarList::push_back(items, "1k samples", 1024);
|
|
||||||
VarList::push_back(items, "2k samples", 2048);
|
|
||||||
VarList::push_back(items, "4K samples", 4096);
|
|
||||||
myFragsizePopup = new PopUpWidget(this, font, xpos, ypos,
|
|
||||||
pwidth, lineHeight,
|
|
||||||
items, "Fragment size", lwidth);
|
|
||||||
wid.push_back(myFragsizePopup);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Output frequency
|
|
||||||
items.clear();
|
|
||||||
VarList::push_back(items, "44100 Hz", 44100);
|
|
||||||
VarList::push_back(items, "48000 Hz", 48000);
|
|
||||||
VarList::push_back(items, "96000 Hz", 96000);
|
|
||||||
myFreqPopup = new PopUpWidget(this, font, xpos, ypos,
|
|
||||||
pwidth, lineHeight,
|
|
||||||
items, "Sample rate", lwidth);
|
|
||||||
wid.push_back(myFreqPopup);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Resampling quality
|
|
||||||
items.clear();
|
|
||||||
VarList::push_back(items, "Low", static_cast<int>(AudioSettings::ResamplingQuality::nearestNeightbour));
|
|
||||||
VarList::push_back(items, "High", static_cast<int>(AudioSettings::ResamplingQuality::lanczos_2));
|
|
||||||
VarList::push_back(items, "Ultra", static_cast<int>(AudioSettings::ResamplingQuality::lanczos_3));
|
|
||||||
myResamplingPopup = new PopUpWidget(this, font, xpos, ypos,
|
|
||||||
pwidth, lineHeight,
|
|
||||||
items, "Resampling quality ", lwidth);
|
|
||||||
wid.push_back(myResamplingPopup);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Param 1
|
|
||||||
int swidth = pwidth+23;
|
|
||||||
myHeadroomSlider = new SliderWidget(this, font, xpos, ypos, swidth, lineHeight,
|
|
||||||
"Headroom ", 0, kHeadroomChanged, 10 * fontWidth);
|
|
||||||
myHeadroomSlider->setMinValue(0); myHeadroomSlider->setMaxValue(AudioSettings::MAX_HEADROOM);
|
|
||||||
myHeadroomSlider->setTickmarkIntervals(5);
|
|
||||||
wid.push_back(myHeadroomSlider);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Param 2
|
|
||||||
myBufferSizeSlider = new SliderWidget(this, font, xpos, ypos, swidth, lineHeight,
|
|
||||||
"Buffer size ", 0, kBufferSizeChanged, 10 * fontWidth);
|
|
||||||
myBufferSizeSlider->setMinValue(0); myBufferSizeSlider->setMaxValue(AudioSettings::MAX_BUFFER_SIZE);
|
|
||||||
myBufferSizeSlider->setTickmarkIntervals(5);
|
|
||||||
wid.push_back(myBufferSizeSlider);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Stereo sound
|
|
||||||
xpos -= INDENT;
|
|
||||||
myStereoSoundCheckbox = new CheckboxWidget(this, font, xpos, ypos,
|
|
||||||
"Stereo for all ROMs");
|
|
||||||
wid.push_back(myStereoSoundCheckbox);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
myDpcPitch = new SliderWidget(this, font, xpos, ypos, swidth - 16, lineHeight,
|
|
||||||
"Pitfall II music pitch ", 0, 0, 5 * fontWidth);
|
|
||||||
myDpcPitch->setMinValue(10000); myDpcPitch->setMaxValue(30000);
|
|
||||||
myDpcPitch->setStepValue(100);
|
|
||||||
myDpcPitch->setTickmarkIntervals(2);
|
|
||||||
wid.push_back(myDpcPitch);
|
|
||||||
|
|
||||||
// Add Defaults, OK and Cancel buttons
|
|
||||||
addDefaultsOKCancelBGroup(wid, font);
|
|
||||||
|
|
||||||
addToFocusList(wid);
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void AudioDialog::loadConfig()
|
|
||||||
{
|
|
||||||
AudioSettings& audioSettings = instance().audioSettings();
|
|
||||||
|
|
||||||
// Enable sound
|
|
||||||
mySoundEnableCheckbox->setState(audioSettings.enabled());
|
|
||||||
|
|
||||||
// Volume
|
|
||||||
myVolumeSlider->setValue(audioSettings.volume());
|
|
||||||
|
|
||||||
// Stereo
|
|
||||||
myStereoSoundCheckbox->setState(audioSettings.stereo());
|
|
||||||
|
|
||||||
// DPC Pitch
|
|
||||||
myDpcPitch->setValue(audioSettings.dpcPitch());
|
|
||||||
|
|
||||||
// Preset / mode
|
|
||||||
myModePopup->setSelected(static_cast<int>(audioSettings.preset()));
|
|
||||||
|
|
||||||
updateSettingsWithPreset(instance().audioSettings());
|
|
||||||
|
|
||||||
updateEnabledState();
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void AudioDialog::updateSettingsWithPreset(AudioSettings& audioSettings)
|
|
||||||
{
|
|
||||||
// Fragsize
|
|
||||||
myFragsizePopup->setSelected(audioSettings.fragmentSize());
|
|
||||||
|
|
||||||
// Output frequency
|
|
||||||
myFreqPopup->setSelected(audioSettings.sampleRate());
|
|
||||||
|
|
||||||
// Headroom
|
|
||||||
myHeadroomSlider->setValue(audioSettings.headroom());
|
|
||||||
|
|
||||||
// Buffer size
|
|
||||||
myBufferSizeSlider->setValue(audioSettings.bufferSize());
|
|
||||||
|
|
||||||
// Resampling quality
|
|
||||||
myResamplingPopup->setSelected(static_cast<int>(audioSettings.resamplingQuality()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void AudioDialog::saveConfig()
|
|
||||||
{
|
|
||||||
AudioSettings& audioSettings = instance().audioSettings();
|
|
||||||
|
|
||||||
// Enabled
|
|
||||||
audioSettings.setEnabled(mySoundEnableCheckbox->getState());
|
|
||||||
instance().sound().setEnabled(mySoundEnableCheckbox->getState());
|
|
||||||
|
|
||||||
// Volume
|
|
||||||
audioSettings.setVolume(myVolumeSlider->getValue());
|
|
||||||
instance().sound().setVolume(myVolumeSlider->getValue());
|
|
||||||
|
|
||||||
// Stereo
|
|
||||||
audioSettings.setStereo(myStereoSoundCheckbox->getState());
|
|
||||||
|
|
||||||
// DPC Pitch
|
|
||||||
audioSettings.setDpcPitch(myDpcPitch->getValue());
|
|
||||||
// update if current cart is Pitfall II
|
|
||||||
if (instance().hasConsole() && instance().console().cartridge().name() == "CartridgeDPC")
|
|
||||||
{
|
|
||||||
CartridgeDPC& cart = static_cast<CartridgeDPC&>(instance().console().cartridge());
|
|
||||||
cart.setDpcPitch(myDpcPitch->getValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
AudioSettings::Preset preset = static_cast<AudioSettings::Preset>(myModePopup->getSelectedTag().toInt());
|
|
||||||
audioSettings.setPreset(preset);
|
|
||||||
|
|
||||||
if (preset == AudioSettings::Preset::custom) {
|
|
||||||
// Fragsize
|
|
||||||
audioSettings.setFragmentSize(myFragsizePopup->getSelectedTag().toInt());
|
|
||||||
audioSettings.setSampleRate(myFreqPopup->getSelectedTag().toInt());
|
|
||||||
audioSettings.setHeadroom(myHeadroomSlider->getValue());
|
|
||||||
audioSettings.setBufferSize(myBufferSizeSlider->getValue());
|
|
||||||
audioSettings.setResamplingQuality(static_cast<AudioSettings::ResamplingQuality>(myResamplingPopup->getSelectedTag().toInt()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only force a re-initialization when necessary, since it can
|
|
||||||
// be a time-consuming operation
|
|
||||||
if(instance().hasConsole())
|
|
||||||
instance().console().initializeAudio();
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void AudioDialog::setDefaults()
|
|
||||||
{
|
|
||||||
mySoundEnableCheckbox->setState(AudioSettings::DEFAULT_ENABLED);
|
|
||||||
myVolumeSlider->setValue(AudioSettings::DEFAULT_VOLUME);
|
|
||||||
myStereoSoundCheckbox->setState(AudioSettings::DEFAULT_STEREO);
|
|
||||||
myDpcPitch->setValue(AudioSettings::DEFAULT_DPC_PITCH);
|
|
||||||
myModePopup->setSelected(static_cast<int>(AudioSettings::DEFAULT_PRESET));
|
|
||||||
|
|
||||||
if (AudioSettings::DEFAULT_PRESET == AudioSettings::Preset::custom) {
|
|
||||||
myResamplingPopup->setSelected(static_cast<int>(AudioSettings::DEFAULT_RESAMPLING_QUALITY));
|
|
||||||
myFragsizePopup->setSelected(AudioSettings::DEFAULT_FRAGMENT_SIZE);
|
|
||||||
myFreqPopup->setSelected(AudioSettings::DEFAULT_SAMPLE_RATE);
|
|
||||||
myHeadroomSlider->setValue(AudioSettings::DEFAULT_HEADROOM);
|
|
||||||
myBufferSizeSlider->setValue(AudioSettings::DEFAULT_BUFFER_SIZE);
|
|
||||||
}
|
|
||||||
else updatePreset();
|
|
||||||
|
|
||||||
updateEnabledState();
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void AudioDialog::updateEnabledState()
|
|
||||||
{
|
|
||||||
bool active = mySoundEnableCheckbox->getState();
|
|
||||||
AudioSettings::Preset preset = static_cast<AudioSettings::Preset>(myModePopup->getSelectedTag().toInt());
|
|
||||||
bool userMode = preset == AudioSettings::Preset::custom;
|
|
||||||
|
|
||||||
myVolumeSlider->setEnabled(active);
|
|
||||||
myStereoSoundCheckbox->setEnabled(active);
|
|
||||||
myModePopup->setEnabled(active);
|
|
||||||
// enable only for Pitfall II cart
|
|
||||||
myDpcPitch->setEnabled(active && instance().hasConsole() && instance().console().cartridge().name() == "CartridgeDPC");
|
|
||||||
|
|
||||||
myFragsizePopup->setEnabled(active && userMode);
|
|
||||||
myFreqPopup->setEnabled(active && userMode);
|
|
||||||
myResamplingPopup->setEnabled(active && userMode);
|
|
||||||
myHeadroomSlider->setEnabled(active && userMode);
|
|
||||||
myBufferSizeSlider->setEnabled(active && userMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void AudioDialog::updatePreset()
|
|
||||||
{
|
|
||||||
AudioSettings::Preset preset = static_cast<AudioSettings::Preset>(myModePopup->getSelectedTag().toInt());
|
|
||||||
|
|
||||||
// Make a copy that does not affect the actual settings...
|
|
||||||
AudioSettings audioSettings = instance().audioSettings();
|
|
||||||
audioSettings.setPersistent(false);
|
|
||||||
// ... and set the requested preset
|
|
||||||
audioSettings.setPreset(preset);
|
|
||||||
|
|
||||||
updateSettingsWithPreset(audioSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void AudioDialog::handleCommand(CommandSender* sender, int cmd,
|
|
||||||
int data, int id)
|
|
||||||
{
|
|
||||||
switch(cmd)
|
|
||||||
{
|
|
||||||
case GuiObject::kOKCmd:
|
|
||||||
saveConfig();
|
|
||||||
close();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GuiObject::kDefaultsCmd:
|
|
||||||
setDefaults();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kSoundEnableChanged:
|
|
||||||
updateEnabledState();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kModeChanged:
|
|
||||||
updatePreset();
|
|
||||||
updateEnabledState();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kHeadroomChanged:
|
|
||||||
{
|
|
||||||
std::ostringstream ss;
|
|
||||||
ss << std::fixed << std::setprecision(1) << (0.5 * myHeadroomSlider->getValue()) << " frames";
|
|
||||||
myHeadroomSlider->setValueLabel(ss.str());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case kBufferSizeChanged:
|
|
||||||
{
|
|
||||||
std::ostringstream ss;
|
|
||||||
ss << std::fixed << std::setprecision(1) << (0.5 * myBufferSizeSlider->getValue()) << " frames";
|
|
||||||
myBufferSizeSlider->setValueLabel(ss.str());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
|
||||||
Dialog::handleCommand(sender, cmd, data, 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
//============================================================================
|
|
||||||
//
|
|
||||||
// SSSS tt lll lll
|
|
||||||
// SS SS tt ll ll
|
|
||||||
// SS tttttt eeee ll ll aaaa
|
|
||||||
// SSSS tt ee ee ll ll aa
|
|
||||||
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
||||||
// SS SS tt ee ll ll aa aa
|
|
||||||
// SSSS ttt eeeee llll llll aaaaa
|
|
||||||
//
|
|
||||||
// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony
|
|
||||||
// and the Stella Team
|
|
||||||
//
|
|
||||||
// See the file "License.txt" for information on usage and redistribution of
|
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
||||||
//============================================================================
|
|
||||||
|
|
||||||
#ifndef AUDIO_DIALOG_HXX
|
|
||||||
#define AUDIO_DIALOG_HXX
|
|
||||||
|
|
||||||
class CommandSender;
|
|
||||||
class Dialog;
|
|
||||||
class DialogContainer;
|
|
||||||
class PopUpWidget;
|
|
||||||
class SliderWidget;
|
|
||||||
class StaticTextWidget;
|
|
||||||
class CheckboxWidget;
|
|
||||||
class OSystem;
|
|
||||||
class AudioSettings;
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
|
||||||
|
|
||||||
class AudioDialog : public Dialog
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
AudioDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font);
|
|
||||||
virtual ~AudioDialog() = default;
|
|
||||||
|
|
||||||
private:
|
|
||||||
void loadConfig() override;
|
|
||||||
void saveConfig() override;
|
|
||||||
void setDefaults() override;
|
|
||||||
|
|
||||||
void updatePreset();
|
|
||||||
void updateEnabledState();
|
|
||||||
void updateSettingsWithPreset(AudioSettings&);
|
|
||||||
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
enum {
|
|
||||||
kSoundEnableChanged = 'ADse',
|
|
||||||
kModeChanged = 'ADmc',
|
|
||||||
kHeadroomChanged = 'ADhc',
|
|
||||||
kBufferSizeChanged = 'ADbc'
|
|
||||||
};
|
|
||||||
|
|
||||||
CheckboxWidget* mySoundEnableCheckbox{nullptr};
|
|
||||||
SliderWidget* myVolumeSlider{nullptr};
|
|
||||||
CheckboxWidget* myStereoSoundCheckbox{nullptr};
|
|
||||||
PopUpWidget* myModePopup{nullptr};
|
|
||||||
PopUpWidget* myFragsizePopup{nullptr};
|
|
||||||
PopUpWidget* myFreqPopup{nullptr};
|
|
||||||
PopUpWidget* myResamplingPopup{nullptr};
|
|
||||||
SliderWidget* myHeadroomSlider{nullptr};
|
|
||||||
SliderWidget* myBufferSizeSlider{nullptr};
|
|
||||||
SliderWidget* myDpcPitch{nullptr};
|
|
||||||
|
|
||||||
private:
|
|
||||||
// Following constructors and assignment operators not supported
|
|
||||||
AudioDialog() = delete;
|
|
||||||
AudioDialog(const AudioDialog&) = delete;
|
|
||||||
AudioDialog(AudioDialog&&) = delete;
|
|
||||||
AudioDialog& operator=(const AudioDialog&) = delete;
|
|
||||||
AudioDialog& operator=(AudioDialog&&) = delete;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -499,31 +499,6 @@ void DeveloperDialog::addTimeMachineTab(const GUI::Font& font)
|
||||||
lineHeight, items, "Horizon ~ ", 0, kHorizonChanged);
|
lineHeight, items, "Horizon ~ ", 0, kHorizonChanged);
|
||||||
wid.push_back(myStateHorizonWidget);
|
wid.push_back(myStateHorizonWidget);
|
||||||
|
|
||||||
xpos = HBORDER + INDENT;
|
|
||||||
ypos += lineHeight + VGAP * 2;
|
|
||||||
new StaticTextWidget(myTab, font, HBORDER, ypos + 1,
|
|
||||||
"When entering/exiting emulation:");
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
mySaveOnExitGroup = new RadioButtonGroup();
|
|
||||||
r = new RadioButtonWidget(myTab, font, xpos, ypos + 1,
|
|
||||||
"Do nothing", mySaveOnExitGroup);
|
|
||||||
wid.push_back(r);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
r = new RadioButtonWidget(myTab, font, xpos, ypos + 1,
|
|
||||||
"Save current state in current slot", mySaveOnExitGroup);
|
|
||||||
wid.push_back(r);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
r = new RadioButtonWidget(myTab, font, xpos, ypos + 1,
|
|
||||||
"Load/save all Time Machine states", mySaveOnExitGroup);
|
|
||||||
wid.push_back(r);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
xpos = HBORDER;
|
|
||||||
|
|
||||||
|
|
||||||
myAutoSlotWidget = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Automatically change save state slots");
|
|
||||||
wid.push_back(myAutoSlotWidget);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Add message concerning usage
|
// Add message concerning usage
|
||||||
const GUI::Font& infofont = instance().frameBuffer().infoFont();
|
const GUI::Font& infofont = instance().frameBuffer().infoFont();
|
||||||
ypos = myTab->getHeight() - fontHeight - infofont.getFontHeight() - VGAP - VBORDER;
|
ypos = myTab->getHeight() - fontHeight - infofont.getFontHeight() - VGAP - VBORDER;
|
||||||
|
@ -678,8 +653,6 @@ void DeveloperDialog::loadSettings(SettingsSet set)
|
||||||
myUncompressed[set] = instance().settings().getInt(prefix + "tm.uncompressed");
|
myUncompressed[set] = instance().settings().getInt(prefix + "tm.uncompressed");
|
||||||
myStateInterval[set] = instance().settings().getString(prefix + "tm.interval");
|
myStateInterval[set] = instance().settings().getString(prefix + "tm.interval");
|
||||||
myStateHorizon[set] = instance().settings().getString(prefix + "tm.horizon");
|
myStateHorizon[set] = instance().settings().getString(prefix + "tm.horizon");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -871,12 +844,6 @@ void DeveloperDialog::loadConfig()
|
||||||
// Debug colours
|
// Debug colours
|
||||||
handleDebugColours(instance().settings().getString("tia.dbgcolors"));
|
handleDebugColours(instance().settings().getString("tia.dbgcolors"));
|
||||||
|
|
||||||
// Save on exit
|
|
||||||
string saveOnExit = instance().settings().getString("saveonexit");
|
|
||||||
mySaveOnExitGroup->setSelected(saveOnExit == "all" ? 2 : saveOnExit == "current" ? 1 : 0);
|
|
||||||
// Automatically change save state slots
|
|
||||||
myAutoSlotWidget->setState(instance().settings().getBool("autoslot"));
|
|
||||||
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
uInt32 w, h;
|
uInt32 w, h;
|
||||||
|
|
||||||
|
@ -953,13 +920,6 @@ void DeveloperDialog::saveConfig()
|
||||||
instance().state().setRewindMode(myTimeMachineWidget->getState() ?
|
instance().state().setRewindMode(myTimeMachineWidget->getState() ?
|
||||||
StateManager::Mode::TimeMachine : StateManager::Mode::Off);
|
StateManager::Mode::TimeMachine : StateManager::Mode::Off);
|
||||||
|
|
||||||
// Save on exit
|
|
||||||
int saveOnExit = mySaveOnExitGroup->getSelected();
|
|
||||||
instance().settings().setValue("saveonexit",
|
|
||||||
saveOnExit == 0 ? "none" : saveOnExit == 1 ? "current" : "all");
|
|
||||||
// Automatically change save state slots
|
|
||||||
instance().settings().setValue("autoslot", myAutoSlotWidget->getState());
|
|
||||||
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
// Debugger font style
|
// Debugger font style
|
||||||
instance().settings().setValue("dbg.fontstyle",
|
instance().settings().setValue("dbg.fontstyle",
|
||||||
|
@ -1050,8 +1010,6 @@ void DeveloperDialog::setDefaults()
|
||||||
myStateHorizon[set] = devSettings ? "30s" : "10m";
|
myStateHorizon[set] = devSettings ? "30s" : "10m";
|
||||||
|
|
||||||
setWidgetStates(set);
|
setWidgetStates(set);
|
||||||
mySaveOnExitGroup->setSelected(0);
|
|
||||||
myAutoSlotWidget->setState(false);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4: // Debugger options
|
case 4: // Debugger options
|
||||||
|
|
|
@ -135,8 +135,6 @@ class DeveloperDialog : public Dialog
|
||||||
SliderWidget* myUncompressedWidget{nullptr};
|
SliderWidget* myUncompressedWidget{nullptr};
|
||||||
PopUpWidget* myStateIntervalWidget{nullptr};
|
PopUpWidget* myStateIntervalWidget{nullptr};
|
||||||
PopUpWidget* myStateHorizonWidget{nullptr};
|
PopUpWidget* myStateHorizonWidget{nullptr};
|
||||||
RadioButtonGroup* mySaveOnExitGroup{nullptr};
|
|
||||||
CheckboxWidget* myAutoSlotWidget{nullptr};
|
|
||||||
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
// Debugger UI widgets
|
// Debugger UI widgets
|
||||||
|
|
|
@ -0,0 +1,283 @@
|
||||||
|
//============================================================================
|
||||||
|
//
|
||||||
|
// SSSS tt lll lll
|
||||||
|
// SS SS tt ll ll
|
||||||
|
// SS tttttt eeee ll ll aaaa
|
||||||
|
// SSSS tt ee ee ll ll aa
|
||||||
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
||||||
|
// SS SS tt ee ll ll aa aa
|
||||||
|
// SSSS ttt eeeee llll llll aaaaa
|
||||||
|
//
|
||||||
|
// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony
|
||||||
|
// and the Stella Team
|
||||||
|
//
|
||||||
|
// See the file "License.txt" for information on usage and redistribution of
|
||||||
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
|
//============================================================================
|
||||||
|
|
||||||
|
#include "Console.hxx"
|
||||||
|
#include "FrameBuffer.hxx"
|
||||||
|
#include "RadioButtonWidget.hxx"
|
||||||
|
#include "TIASurface.hxx"
|
||||||
|
|
||||||
|
#include "EmulationDialog.hxx"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
// Emulation speed is a positive float that multiplies the framerate. However, the UI controls
|
||||||
|
// adjust speed in terms of a speedup factor (1/10, 1/9 .. 1/2, 1, 2, 3, .., 10). The following
|
||||||
|
// mapping and formatting functions implement this conversion. The speedup factor is represented
|
||||||
|
// by an integer value between -900 and 900 (0 means no speedup).
|
||||||
|
|
||||||
|
constexpr int MAX_SPEED = 900;
|
||||||
|
constexpr int MIN_SPEED = -900;
|
||||||
|
constexpr int SPEED_STEP = 10;
|
||||||
|
|
||||||
|
int mapSpeed(float speed)
|
||||||
|
{
|
||||||
|
speed = std::abs(speed);
|
||||||
|
|
||||||
|
return BSPF::clamp(
|
||||||
|
static_cast<int>(round(100 * (speed >= 1 ? speed - 1 : -1 / speed + 1))),
|
||||||
|
MIN_SPEED, MAX_SPEED
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
float unmapSpeed(int speed)
|
||||||
|
{
|
||||||
|
float f_speed = static_cast<float>(speed) / 100;
|
||||||
|
|
||||||
|
return speed < 0 ? -1 / (f_speed - 1) : 1 + f_speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
string formatSpeed(int speed) {
|
||||||
|
stringstream ss;
|
||||||
|
|
||||||
|
ss
|
||||||
|
<< std::setw(3) << std::fixed << std::setprecision(0)
|
||||||
|
<< (unmapSpeed(speed) * 100);
|
||||||
|
|
||||||
|
return ss.str();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
EmulationDialog::EmulationDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
const GUI::Font& font, int max_w, int max_h)
|
||||||
|
: Dialog(osystem, parent, font, "Emulation settings")
|
||||||
|
{
|
||||||
|
const int lineHeight = font.getLineHeight(),
|
||||||
|
fontHeight = font.getFontHeight(),
|
||||||
|
fontWidth = font.getMaxCharWidth(),
|
||||||
|
buttonHeight = font.getLineHeight() * 1.25;
|
||||||
|
const int VBORDER = fontHeight / 2;
|
||||||
|
const int HBORDER = fontWidth * 1.25;
|
||||||
|
const int INDENT = fontWidth * 2;
|
||||||
|
const int VGAP = fontHeight / 4;
|
||||||
|
|
||||||
|
int xpos, ypos;
|
||||||
|
int lwidth = font.getStringWidth("Emulation speed ");
|
||||||
|
WidgetArray wid;
|
||||||
|
VariantList items;
|
||||||
|
const int swidth = fontWidth * 10;
|
||||||
|
|
||||||
|
// Set real dimensions
|
||||||
|
_w = 37 * fontWidth + HBORDER * 2 + CheckboxWidget::prefixSize(_font);
|
||||||
|
_h = 12 * (lineHeight + VGAP) + VGAP * 7 + VBORDER * 3 + _th + buttonHeight;
|
||||||
|
|
||||||
|
xpos = HBORDER; ypos = VBORDER + _th;
|
||||||
|
|
||||||
|
// Speed
|
||||||
|
mySpeed =
|
||||||
|
new SliderWidget(this, _font, xpos, ypos-1, swidth, lineHeight,
|
||||||
|
"Emulation speed ", lwidth, kSpeedupChanged, fontWidth * 5, "%");
|
||||||
|
mySpeed->setMinValue(MIN_SPEED); mySpeed->setMaxValue(MAX_SPEED);
|
||||||
|
mySpeed->setStepValue(SPEED_STEP);
|
||||||
|
mySpeed->setTickmarkIntervals(2);
|
||||||
|
wid.push_back(mySpeed);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Use sync to vblank
|
||||||
|
myUseVSync = new CheckboxWidget(this, _font, xpos, ypos + 1, "VSync");
|
||||||
|
wid.push_back(myUseVSync);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
|
||||||
|
myTurbo = new CheckboxWidget(this, _font, xpos, ypos + 1, "Turbo mode");
|
||||||
|
wid.push_back(myTurbo);
|
||||||
|
ypos += lineHeight + VGAP * 3;
|
||||||
|
|
||||||
|
// Use multi-threading
|
||||||
|
myUseThreads = new CheckboxWidget(this, _font, xpos, ypos + 1, "Multi-threading");
|
||||||
|
wid.push_back(myUseThreads);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Skip progress load bars for SuperCharger ROMs
|
||||||
|
// Doesn't really belong here, but I couldn't find a better place for it
|
||||||
|
myFastSCBios = new CheckboxWidget(this, _font, xpos, ypos + 1, "Fast SuperCharger load");
|
||||||
|
wid.push_back(myFastSCBios);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Show UI messages onscreen
|
||||||
|
myUIMessages = new CheckboxWidget(this, _font, xpos, ypos + 1, "Show UI messages");
|
||||||
|
wid.push_back(myUIMessages);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Confirm dialog when exiting emulation
|
||||||
|
xpos = HBORDER; ypos += VGAP * 3;
|
||||||
|
myConfirmExitWidget = new CheckboxWidget(this, _font, xpos, ypos, "Confirm exiting emulation");
|
||||||
|
wid.push_back(myConfirmExitWidget);
|
||||||
|
|
||||||
|
xpos = HBORDER + INDENT;
|
||||||
|
ypos += lineHeight + VGAP * 3;
|
||||||
|
new StaticTextWidget(this, font, HBORDER, ypos + 1,
|
||||||
|
"When entering/exiting emulation:");
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
mySaveOnExitGroup = new RadioButtonGroup();
|
||||||
|
RadioButtonWidget* r;
|
||||||
|
r = new RadioButtonWidget(this, font, xpos, ypos + 1,
|
||||||
|
"Do nothing", mySaveOnExitGroup);
|
||||||
|
wid.push_back(r);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
r = new RadioButtonWidget(this, font, xpos, ypos + 1,
|
||||||
|
"Save current state in current slot", mySaveOnExitGroup);
|
||||||
|
wid.push_back(r);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
r = new RadioButtonWidget(this, font, xpos, ypos + 1,
|
||||||
|
"Load/save all Time Machine states", mySaveOnExitGroup);
|
||||||
|
wid.push_back(r);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
xpos = HBORDER;
|
||||||
|
|
||||||
|
|
||||||
|
myAutoSlotWidget = new CheckboxWidget(this, font, xpos, ypos + 1, "Automatically change save state slots");
|
||||||
|
wid.push_back(myAutoSlotWidget);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Add Defaults, OK and Cancel buttons
|
||||||
|
addDefaultsOKCancelBGroup(wid, font);
|
||||||
|
|
||||||
|
addToFocusList(wid);
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void EmulationDialog::loadConfig()
|
||||||
|
{
|
||||||
|
Settings& settings = instance().settings();
|
||||||
|
|
||||||
|
// Emulation speed
|
||||||
|
int speed = mapSpeed(settings.getFloat("speed"));
|
||||||
|
mySpeed->setValue(speed);
|
||||||
|
mySpeed->setValueLabel(formatSpeed(speed));
|
||||||
|
|
||||||
|
// Use sync to vertical blank
|
||||||
|
myUseVSync->setState(settings.getBool("vsync"));
|
||||||
|
|
||||||
|
// Enable 'Turbo' mode
|
||||||
|
myTurbo->setState(settings.getBool("turbo"));
|
||||||
|
|
||||||
|
// Show UI messages
|
||||||
|
myUIMessages->setState(settings.getBool("uimessages"));
|
||||||
|
|
||||||
|
// Fast loading of Supercharger BIOS
|
||||||
|
myFastSCBios->setState(settings.getBool("fastscbios"));
|
||||||
|
|
||||||
|
// Multi-threaded rendering
|
||||||
|
myUseThreads->setState(settings.getBool("threads"));
|
||||||
|
|
||||||
|
// Confirm dialog when exiting emulation
|
||||||
|
myConfirmExitWidget->setState(settings.getBool("confirmexit"));
|
||||||
|
|
||||||
|
// Save on exit
|
||||||
|
string saveOnExit = settings.getString("saveonexit");
|
||||||
|
mySaveOnExitGroup->setSelected(saveOnExit == "all" ? 2 : saveOnExit == "current" ? 1 : 0);
|
||||||
|
// Automatically change save state slots
|
||||||
|
myAutoSlotWidget->setState(settings.getBool("autoslot"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void EmulationDialog::saveConfig()
|
||||||
|
{
|
||||||
|
Settings& settings = instance().settings();
|
||||||
|
|
||||||
|
// Speed
|
||||||
|
const int speedup = mySpeed->getValue();
|
||||||
|
settings.setValue("speed", unmapSpeed(speedup));
|
||||||
|
if(instance().hasConsole())
|
||||||
|
instance().console().initializeAudio();
|
||||||
|
|
||||||
|
// Use sync to vertical blank
|
||||||
|
settings.setValue("vsync", myUseVSync->getState());
|
||||||
|
|
||||||
|
// Enable 'Turbo' mode
|
||||||
|
settings.setValue("turbo", myTurbo->getState());
|
||||||
|
|
||||||
|
// Show UI messages
|
||||||
|
settings.setValue("uimessages", myUIMessages->getState());
|
||||||
|
|
||||||
|
// Fast loading of Supercharger BIOS
|
||||||
|
settings.setValue("fastscbios", myFastSCBios->getState());
|
||||||
|
|
||||||
|
// Multi-threaded rendering
|
||||||
|
settings.setValue("threads", myUseThreads->getState());
|
||||||
|
|
||||||
|
// Confirm dialog when exiting emulation
|
||||||
|
settings.setValue("confirmexit", myConfirmExitWidget->getState());
|
||||||
|
|
||||||
|
// Save on exit
|
||||||
|
int saveOnExit = mySaveOnExitGroup->getSelected();
|
||||||
|
settings.setValue("saveonexit",
|
||||||
|
saveOnExit == 0 ? "none" : saveOnExit == 1 ? "current" : "all");
|
||||||
|
// Automatically change save state slots
|
||||||
|
settings.setValue("autoslot", myAutoSlotWidget->getState());
|
||||||
|
|
||||||
|
if(instance().hasConsole())
|
||||||
|
{
|
||||||
|
// update speed
|
||||||
|
instance().console().initializeAudio();
|
||||||
|
// update VSync
|
||||||
|
instance().console().initializeVideo();
|
||||||
|
|
||||||
|
instance().frameBuffer().tiaSurface().ntsc().enableThreading(myUseThreads->getState());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void EmulationDialog::setDefaults()
|
||||||
|
{
|
||||||
|
// speed
|
||||||
|
mySpeed->setValue(0);
|
||||||
|
myUseVSync->setState(true);
|
||||||
|
// misc
|
||||||
|
myUIMessages->setState(true);
|
||||||
|
myFastSCBios->setState(true);
|
||||||
|
myUseThreads->setState(false);
|
||||||
|
myConfirmExitWidget->setState(false);
|
||||||
|
|
||||||
|
mySaveOnExitGroup->setSelected(0);
|
||||||
|
myAutoSlotWidget->setState(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void EmulationDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
|
int data, int id)
|
||||||
|
{
|
||||||
|
switch(cmd)
|
||||||
|
{
|
||||||
|
case GuiObject::kOKCmd:
|
||||||
|
saveConfig();
|
||||||
|
close();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GuiObject::kDefaultsCmd:
|
||||||
|
setDefaults();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case kSpeedupChanged:
|
||||||
|
mySpeed->setValueLabel(formatSpeed(mySpeed->getValue()));
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
Dialog::handleCommand(sender, cmd, data, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
//============================================================================
|
||||||
|
//
|
||||||
|
// SSSS tt lll lll
|
||||||
|
// SS SS tt ll ll
|
||||||
|
// SS tttttt eeee ll ll aaaa
|
||||||
|
// SSSS tt ee ee ll ll aa
|
||||||
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
||||||
|
// SS SS tt ee ll ll aa aa
|
||||||
|
// SSSS ttt eeeee llll llll aaaaa
|
||||||
|
//
|
||||||
|
// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony
|
||||||
|
// and the Stella Team
|
||||||
|
//
|
||||||
|
// See the file "License.txt" for information on usage and redistribution of
|
||||||
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
|
//============================================================================
|
||||||
|
|
||||||
|
#ifndef EMULATION_DIALOG_HXX
|
||||||
|
#define EMULATION_DIALOG_HXX
|
||||||
|
|
||||||
|
class RadioButtonGroup;
|
||||||
|
|
||||||
|
#include "Dialog.hxx"
|
||||||
|
|
||||||
|
class EmulationDialog : public Dialog
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EmulationDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font,
|
||||||
|
int max_w, int max_h);
|
||||||
|
virtual ~EmulationDialog() = default;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void loadConfig() override;
|
||||||
|
void saveConfig() override;
|
||||||
|
void setDefaults() override;
|
||||||
|
|
||||||
|
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
SliderWidget* mySpeed{nullptr};
|
||||||
|
CheckboxWidget* myUseVSync{nullptr};
|
||||||
|
CheckboxWidget* myTurbo{nullptr};
|
||||||
|
CheckboxWidget* myUIMessages{nullptr};
|
||||||
|
CheckboxWidget* myFastSCBios{nullptr};
|
||||||
|
CheckboxWidget* myUseThreads{nullptr};
|
||||||
|
CheckboxWidget* myConfirmExitWidget{nullptr};
|
||||||
|
RadioButtonGroup* mySaveOnExitGroup{nullptr};
|
||||||
|
CheckboxWidget* myAutoSlotWidget{nullptr};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
kSpeedupChanged = 'EDSp',
|
||||||
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Following constructors and assignment operators not supported
|
||||||
|
EmulationDialog() = delete;
|
||||||
|
EmulationDialog(const EmulationDialog&) = delete;
|
||||||
|
EmulationDialog(EmulationDialog&&) = delete;
|
||||||
|
EmulationDialog& operator=(const EmulationDialog&) = delete;
|
||||||
|
EmulationDialog& operator=(EmulationDialog&&) = delete;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -53,7 +53,7 @@ InputDialog::InputDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
int xpos, ypos, tabID;
|
int xpos, ypos, tabID;
|
||||||
|
|
||||||
// Set real dimensions
|
// Set real dimensions
|
||||||
setSize(50 * fontWidth + HBORDER * 2,
|
setSize(48 * fontWidth + PopUpWidget::dropDownWidth(_font) + HBORDER * 2,
|
||||||
_th + VGAP * 3 + lineHeight + 13 * (lineHeight + VGAP) + VGAP * 8 + buttonHeight + VBORDER * 3,
|
_th + VGAP * 3 + lineHeight + 13 * (lineHeight + VGAP) + VGAP * 8 + buttonHeight + VBORDER * 3,
|
||||||
max_w, max_h);
|
max_w, max_h);
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "Font.hxx"
|
#include "Font.hxx"
|
||||||
#include "Control.hxx"
|
#include "Control.hxx"
|
||||||
#include "VideoDialog.hxx"
|
#include "EmulationDialog.hxx"
|
||||||
#include "AudioDialog.hxx"
|
#include "VideoAudioDialog.hxx"
|
||||||
#include "InputDialog.hxx"
|
#include "InputDialog.hxx"
|
||||||
#include "UIDialog.hxx"
|
#include "UIDialog.hxx"
|
||||||
#include "SnapshotDialog.hxx"
|
#include "SnapshotDialog.hxx"
|
||||||
|
@ -89,13 +89,10 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
return bw;
|
return bw;
|
||||||
};
|
};
|
||||||
|
|
||||||
b = ADD_OD_BUTTON("Video" + ELLIPSIS, kVidCmd);
|
b = ADD_OD_BUTTON("Video & Audio" + ELLIPSIS, kVidCmd);
|
||||||
wid.push_back(b);
|
wid.push_back(b);
|
||||||
|
|
||||||
b = ADD_OD_BUTTON("Audio" + ELLIPSIS, kAudCmd);
|
b = ADD_OD_BUTTON("Emulation" + ELLIPSIS, kEmuCmd);
|
||||||
#ifndef SOUND_SUPPORT
|
|
||||||
b->clearFlags(Widget::FLAG_ENABLED);
|
|
||||||
#endif
|
|
||||||
wid.push_back(b);
|
wid.push_back(b);
|
||||||
|
|
||||||
b = ADD_OD_BUTTON("Input" + ELLIPSIS, kInptCmd);
|
b = ADD_OD_BUTTON("Input" + ELLIPSIS, kInptCmd);
|
||||||
|
@ -143,8 +140,8 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
addCancelWidget(b);
|
addCancelWidget(b);
|
||||||
|
|
||||||
// Now create all the dialogs attached to each menu button
|
// Now create all the dialogs attached to each menu button
|
||||||
myVideoDialog = make_unique<VideoDialog>(osystem, parent, _font, max_w, max_h);
|
myVideoDialog = make_unique<VideoAudioDialog>(osystem, parent, _font, max_w, max_h);
|
||||||
myAudioDialog = make_unique<AudioDialog>(osystem, parent, _font);
|
myEmulationDialog= make_unique<EmulationDialog>(osystem, parent, _font, max_w, max_h);
|
||||||
myInputDialog = make_unique<InputDialog>(osystem, parent, _font, max_w, max_h);
|
myInputDialog = make_unique<InputDialog>(osystem, parent, _font, max_w, max_h);
|
||||||
myUIDialog = make_unique<UIDialog>(osystem, parent, _font, boss, max_w, max_h);
|
myUIDialog = make_unique<UIDialog>(osystem, parent, _font, boss, max_w, max_h);
|
||||||
mySnapshotDialog = make_unique<SnapshotDialog>(osystem, parent, _font, max_w, max_h);
|
mySnapshotDialog = make_unique<SnapshotDialog>(osystem, parent, _font, max_w, max_h);
|
||||||
|
@ -212,6 +209,10 @@ void OptionsDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
instance().eventHandler().leaveMenuMode();
|
instance().eventHandler().leaveMenuMode();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kEmuCmd:
|
||||||
|
myEmulationDialog->open();
|
||||||
|
break;
|
||||||
|
|
||||||
case kVidCmd:
|
case kVidCmd:
|
||||||
{
|
{
|
||||||
// This dialog is resizable under certain conditions, so we need
|
// This dialog is resizable under certain conditions, so we need
|
||||||
|
@ -220,17 +221,12 @@ void OptionsDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
|
|
||||||
if(myVideoDialog == nullptr || myVideoDialog->shouldResize(w, h))
|
if(myVideoDialog == nullptr || myVideoDialog->shouldResize(w, h))
|
||||||
{
|
{
|
||||||
myVideoDialog = make_unique<VideoDialog>(instance(), parent(),
|
myVideoDialog = make_unique<VideoAudioDialog>(instance(), parent(),
|
||||||
instance().frameBuffer().font(), w, h);
|
instance().frameBuffer().font(), w, h);
|
||||||
}
|
}
|
||||||
myVideoDialog->open();
|
myVideoDialog->open();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case kAudCmd:
|
|
||||||
myAudioDialog->open();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kInptCmd:
|
case kInptCmd:
|
||||||
{
|
{
|
||||||
// This dialog is resizable under certain conditions, so we need
|
// This dialog is resizable under certain conditions, so we need
|
||||||
|
|
|
@ -22,8 +22,8 @@ class CommandSender;
|
||||||
class DialogContainer;
|
class DialogContainer;
|
||||||
class GuiObject;
|
class GuiObject;
|
||||||
class OSystem;
|
class OSystem;
|
||||||
class VideoDialog;
|
class EmulationDialog;
|
||||||
class AudioDialog;
|
class VideoAudioDialog;
|
||||||
class InputDialog;
|
class InputDialog;
|
||||||
class UIDialog;
|
class UIDialog;
|
||||||
class SnapshotDialog;
|
class SnapshotDialog;
|
||||||
|
@ -52,8 +52,8 @@ class OptionsDialog : public Dialog
|
||||||
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unique_ptr<VideoDialog> myVideoDialog;
|
unique_ptr<VideoAudioDialog> myVideoDialog;
|
||||||
unique_ptr<AudioDialog> myAudioDialog;
|
unique_ptr<EmulationDialog> myEmulationDialog;
|
||||||
unique_ptr<InputDialog> myInputDialog;
|
unique_ptr<InputDialog> myInputDialog;
|
||||||
unique_ptr<UIDialog> myUIDialog;
|
unique_ptr<UIDialog> myUIDialog;
|
||||||
unique_ptr<SnapshotDialog> mySnapshotDialog;
|
unique_ptr<SnapshotDialog> mySnapshotDialog;
|
||||||
|
@ -78,7 +78,7 @@ class OptionsDialog : public Dialog
|
||||||
enum {
|
enum {
|
||||||
kBasSetCmd = 'BAST',
|
kBasSetCmd = 'BAST',
|
||||||
kVidCmd = 'VIDO',
|
kVidCmd = 'VIDO',
|
||||||
kAudCmd = 'AUDO',
|
kEmuCmd = 'EMUO',
|
||||||
kInptCmd = 'INPT',
|
kInptCmd = 'INPT',
|
||||||
kUsrIfaceCmd = 'URIF',
|
kUsrIfaceCmd = 'URIF',
|
||||||
kSnapCmd = 'SNAP',
|
kSnapCmd = 'SNAP',
|
||||||
|
|
|
@ -127,13 +127,8 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
myCenter = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Center windows");
|
myCenter = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Center windows");
|
||||||
wid.push_back(myCenter);
|
wid.push_back(myCenter);
|
||||||
|
|
||||||
// Confirm dialog when exiting emulation
|
|
||||||
xpos = HBORDER; ypos += lineHeight + VGAP * 2;
|
|
||||||
myConfirmExitWidget = new CheckboxWidget(myTab, font, xpos, ypos, "Confirm exiting emulation");
|
|
||||||
wid.push_back(myConfirmExitWidget);
|
|
||||||
ypos += lineHeight + VGAP * 3;
|
|
||||||
|
|
||||||
// Delay between quick-selecting characters in ListWidget
|
// Delay between quick-selecting characters in ListWidget
|
||||||
|
xpos = HBORDER; ypos += lineHeight + VGAP * 4;
|
||||||
int swidth = myPalettePopup->getWidth() - lwidth;
|
int swidth = myPalettePopup->getWidth() - lwidth;
|
||||||
myListDelaySlider = new SliderWidget(myTab, font, xpos, ypos, swidth, lineHeight,
|
myListDelaySlider = new SliderWidget(myTab, font, xpos, ypos, swidth, lineHeight,
|
||||||
"List input delay ", 0, kListDelay,
|
"List input delay ", 0, kListDelay,
|
||||||
|
@ -384,9 +379,6 @@ void UIDialog::loadConfig()
|
||||||
// Center window
|
// Center window
|
||||||
myCenter->setState(settings.getBool("center"));
|
myCenter->setState(settings.getBool("center"));
|
||||||
|
|
||||||
// Confirm dialog when exiting emulation
|
|
||||||
myConfirmExitWidget->setState(settings.getBool("confirmexit"));
|
|
||||||
|
|
||||||
// Listwidget quick delay
|
// Listwidget quick delay
|
||||||
int delay = settings.getInt("listdelay");
|
int delay = settings.getInt("listdelay");
|
||||||
myListDelaySlider->setValue(delay);
|
myListDelaySlider->setValue(delay);
|
||||||
|
@ -462,9 +454,6 @@ void UIDialog::saveConfig()
|
||||||
// Center window
|
// Center window
|
||||||
settings.setValue("center", myCenter->getState());
|
settings.setValue("center", myCenter->getState());
|
||||||
|
|
||||||
// Confirm dialog when exiting emulation
|
|
||||||
settings.setValue("confirmexit", myConfirmExitWidget->getState());
|
|
||||||
|
|
||||||
// Listwidget quick delay
|
// Listwidget quick delay
|
||||||
settings.setValue("listdelay", myListDelaySlider->getValue());
|
settings.setValue("listdelay", myListDelaySlider->getValue());
|
||||||
FileListWidget::setQuickSelectDelay(myListDelaySlider->getValue());
|
FileListWidget::setQuickSelectDelay(myListDelaySlider->getValue());
|
||||||
|
@ -501,7 +490,6 @@ void UIDialog::setDefaults()
|
||||||
myHidpiWidget->setState(false);
|
myHidpiWidget->setState(false);
|
||||||
myPositionPopup->setSelected("0");
|
myPositionPopup->setSelected("0");
|
||||||
myCenter->setState(false);
|
myCenter->setState(false);
|
||||||
myConfirmExitWidget->setState(false);
|
|
||||||
myListDelaySlider->setValue(300);
|
myListDelaySlider->setValue(300);
|
||||||
myWheelLinesSlider->setValue(4);
|
myWheelLinesSlider->setValue(4);
|
||||||
myDoubleClickSlider->setValue(500);
|
myDoubleClickSlider->setValue(500);
|
||||||
|
|
|
@ -70,7 +70,6 @@ class UIDialog : public Dialog, public CommandSender
|
||||||
CheckboxWidget* myHidpiWidget{nullptr};
|
CheckboxWidget* myHidpiWidget{nullptr};
|
||||||
PopUpWidget* myPositionPopup{nullptr};
|
PopUpWidget* myPositionPopup{nullptr};
|
||||||
CheckboxWidget* myCenter{nullptr};
|
CheckboxWidget* myCenter{nullptr};
|
||||||
CheckboxWidget* myConfirmExitWidget{nullptr};
|
|
||||||
SliderWidget* myListDelaySlider{nullptr};
|
SliderWidget* myListDelaySlider{nullptr};
|
||||||
SliderWidget* myWheelLinesSlider{nullptr};
|
SliderWidget* myWheelLinesSlider{nullptr};
|
||||||
SliderWidget* myControllerRateSlider{nullptr};
|
SliderWidget* myControllerRateSlider{nullptr};
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "Base.hxx"
|
#include "Base.hxx"
|
||||||
#include "Control.hxx"
|
#include "Control.hxx"
|
||||||
|
#include "Cart.hxx"
|
||||||
|
#include "CartDPC.hxx"
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "Menu.hxx"
|
#include "Menu.hxx"
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
|
@ -30,51 +32,15 @@
|
||||||
#include "PaletteHandler.hxx"
|
#include "PaletteHandler.hxx"
|
||||||
#include "TIA.hxx"
|
#include "TIA.hxx"
|
||||||
#include "Settings.hxx"
|
#include "Settings.hxx"
|
||||||
|
#include "Sound.hxx"
|
||||||
|
#include "AudioSettings.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "Font.hxx"
|
#include "Font.hxx"
|
||||||
#include "TabWidget.hxx"
|
#include "TabWidget.hxx"
|
||||||
#include "NTSCFilter.hxx"
|
#include "NTSCFilter.hxx"
|
||||||
#include "TIASurface.hxx"
|
#include "TIASurface.hxx"
|
||||||
|
|
||||||
#include "VideoDialog.hxx"
|
#include "VideoAudioDialog.hxx"
|
||||||
|
|
||||||
namespace {
|
|
||||||
// Emulation speed is a positive float that multiplies the framerate. However, the UI controls
|
|
||||||
// adjust speed in terms of a speedup factor (1/10, 1/9 .. 1/2, 1, 2, 3, .., 10). The following
|
|
||||||
// mapping and formatting functions implement this conversion. The speedup factor is represented
|
|
||||||
// by an integer value between -900 and 900 (0 means no speedup).
|
|
||||||
|
|
||||||
constexpr int MAX_SPEED = 900;
|
|
||||||
constexpr int MIN_SPEED = -900;
|
|
||||||
constexpr int SPEED_STEP = 10;
|
|
||||||
|
|
||||||
int mapSpeed(float speed)
|
|
||||||
{
|
|
||||||
speed = std::abs(speed);
|
|
||||||
|
|
||||||
return BSPF::clamp(
|
|
||||||
static_cast<int>(round(100 * (speed >= 1 ? speed - 1 : -1 / speed + 1))),
|
|
||||||
MIN_SPEED, MAX_SPEED
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
float unmapSpeed(int speed)
|
|
||||||
{
|
|
||||||
float f_speed = static_cast<float>(speed) / 100;
|
|
||||||
|
|
||||||
return speed < 0 ? -1 / (f_speed - 1) : 1 + f_speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
string formatSpeed(int speed) {
|
|
||||||
stringstream ss;
|
|
||||||
|
|
||||||
ss
|
|
||||||
<< std::setw(3) << std::fixed << std::setprecision(0)
|
|
||||||
<< (unmapSpeed(speed) * 100);
|
|
||||||
|
|
||||||
return ss.str();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define CREATE_CUSTOM_SLIDERS(obj, desc, cmd) \
|
#define CREATE_CUSTOM_SLIDERS(obj, desc, cmd) \
|
||||||
myTV ## obj = \
|
myTV ## obj = \
|
||||||
|
@ -87,9 +53,9 @@ namespace {
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
VideoAudioDialog::VideoAudioDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
const GUI::Font& font, int max_w, int max_h)
|
const GUI::Font& font, int max_w, int max_h)
|
||||||
: Dialog(osystem, parent, font, "Video settings")
|
: Dialog(osystem, parent, font, "Video & Audio settings")
|
||||||
{
|
{
|
||||||
const int lineHeight = _font.getLineHeight(),
|
const int lineHeight = _font.getLineHeight(),
|
||||||
fontHeight = _font.getFontHeight(),
|
fontHeight = _font.getFontHeight(),
|
||||||
|
@ -101,8 +67,8 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
int xpos, ypos;
|
int xpos, ypos;
|
||||||
|
|
||||||
// Set real dimensions
|
// Set real dimensions
|
||||||
setSize(57 * fontWidth + HBORDER * 2 + PopUpWidget::dropDownWidth(font) * 2,
|
setSize(44 * fontWidth + HBORDER * 2 + PopUpWidget::dropDownWidth(font) * 2,
|
||||||
_th + VGAP * 3 + lineHeight + 11 * (lineHeight + VGAP) + buttonHeight + VBORDER * 3,
|
_th + VGAP * 6 + lineHeight + 10 * (lineHeight + VGAP) + buttonHeight + VBORDER * 3,
|
||||||
max_w, max_h);
|
max_w, max_h);
|
||||||
|
|
||||||
// The tab widget
|
// The tab widget
|
||||||
|
@ -112,9 +78,10 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
_h - _th - VGAP - buttonHeight - VBORDER * 2);
|
_h - _th - VGAP - buttonHeight - VBORDER * 2);
|
||||||
addTabWidget(myTab);
|
addTabWidget(myTab);
|
||||||
|
|
||||||
addGeneralTab();
|
addDisplayTab();
|
||||||
addPaletteTab();
|
addPaletteTab();
|
||||||
addTVEffectsTab();
|
addTVEffectsTab();
|
||||||
|
addAudioTab();
|
||||||
|
|
||||||
//const int req_w = std::max(myFastSCBios->getRight(), myCloneBad->getRight()) + HBORDER + 1;
|
//const int req_w = std::max(myFastSCBios->getRight(), myCloneBad->getRight()) + HBORDER + 1;
|
||||||
//const int req_h = _th + VGAP * 3
|
//const int req_h = _th + VGAP * 3
|
||||||
|
@ -141,7 +108,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::addGeneralTab()
|
void VideoAudioDialog::addDisplayTab()
|
||||||
{
|
{
|
||||||
const int lineHeight = _font.getLineHeight(),
|
const int lineHeight = _font.getLineHeight(),
|
||||||
fontHeight = _font.getFontHeight(),
|
fontHeight = _font.getFontHeight(),
|
||||||
|
@ -152,24 +119,32 @@ void VideoDialog::addGeneralTab()
|
||||||
const int HBORDER = fontWidth * 1.25;
|
const int HBORDER = fontWidth * 1.25;
|
||||||
const int INDENT = CheckboxWidget::prefixSize(_font);
|
const int INDENT = CheckboxWidget::prefixSize(_font);
|
||||||
const int lwidth = _font.getStringWidth("V-Size adjust "),
|
const int lwidth = _font.getStringWidth("V-Size adjust "),
|
||||||
pwidth = _font.getStringWidth("XXXXxXXXX");
|
pwidth = _font.getStringWidth("OpenGLES2");
|
||||||
int xpos = HBORDER,
|
int xpos = HBORDER,
|
||||||
ypos = VBORDER;
|
ypos = VBORDER;
|
||||||
WidgetArray wid;
|
WidgetArray wid;
|
||||||
VariantList items;
|
VariantList items;
|
||||||
const int tabID = myTab->addTab(" General ");
|
const int tabID = myTab->addTab(" Display ", TabWidget::AUTO_WIDTH);
|
||||||
|
|
||||||
// Video renderer
|
// Video renderer
|
||||||
myRenderer = new PopUpWidget(myTab, _font, xpos, ypos, pwidth, lineHeight,
|
myRenderer = new PopUpWidget(myTab, _font, xpos, ypos, pwidth, lineHeight,
|
||||||
instance().frameBuffer().supportedRenderers(),
|
instance().frameBuffer().supportedRenderers(),
|
||||||
"Renderer ", lwidth);
|
"Renderer ", lwidth);
|
||||||
wid.push_back(myRenderer);
|
wid.push_back(myRenderer);
|
||||||
|
const int swidth = myRenderer->getWidth() - lwidth;
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// TIA interpolation
|
// TIA interpolation
|
||||||
myTIAInterpolate = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Interpolation ");
|
myTIAInterpolate = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Interpolation ");
|
||||||
wid.push_back(myTIAInterpolate); ypos += lineHeight + VGAP * 4;
|
wid.push_back(myTIAInterpolate); ypos += lineHeight + VGAP * 4;
|
||||||
|
|
||||||
|
// TIA zoom levels (will be dynamically filled later)
|
||||||
|
myTIAZoom = new SliderWidget(myTab, _font, xpos, ypos - 1, swidth, lineHeight,
|
||||||
|
"Zoom ", lwidth, 0, fontWidth * 4, "%");
|
||||||
|
myTIAZoom->setMinValue(200); myTIAZoom->setStepValue(FrameBuffer::ZOOM_STEPS * 100);
|
||||||
|
wid.push_back(myTIAZoom);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// Fullscreen
|
// Fullscreen
|
||||||
myFullscreen = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Fullscreen", kFullScreenChanged);
|
myFullscreen = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Fullscreen", kFullScreenChanged);
|
||||||
wid.push_back(myFullscreen);
|
wid.push_back(myFullscreen);
|
||||||
|
@ -187,7 +162,6 @@ void VideoDialog::addGeneralTab()
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// FS overscan
|
// FS overscan
|
||||||
const int swidth = myRenderer->getWidth() - lwidth;
|
|
||||||
myTVOverscan = new SliderWidget(myTab, _font, xpos + INDENT, ypos - 1, swidth, lineHeight,
|
myTVOverscan = new SliderWidget(myTab, _font, xpos + INDENT, ypos - 1, swidth, lineHeight,
|
||||||
"Overscan", lwidth - INDENT, kOverscanChanged, fontWidth * 3, "%");
|
"Overscan", lwidth - INDENT, kOverscanChanged, fontWidth * 3, "%");
|
||||||
myTVOverscan->setMinValue(0); myTVOverscan->setMaxValue(10);
|
myTVOverscan->setMinValue(0); myTVOverscan->setMaxValue(10);
|
||||||
|
@ -195,13 +169,6 @@ void VideoDialog::addGeneralTab()
|
||||||
wid.push_back(myTVOverscan);
|
wid.push_back(myTVOverscan);
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
// TIA zoom levels (will be dynamically filled later)
|
|
||||||
myTIAZoom = new SliderWidget(myTab, _font, xpos, ypos - 1, swidth, lineHeight,
|
|
||||||
"Zoom ", lwidth, 0, fontWidth * 4, "%");
|
|
||||||
myTIAZoom->setMinValue(200); myTIAZoom->setStepValue(FrameBuffer::ZOOM_STEPS * 100);
|
|
||||||
wid.push_back(myTIAZoom);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Vertical size
|
// Vertical size
|
||||||
myVSizeAdjust =
|
myVSizeAdjust =
|
||||||
new SliderWidget(myTab, _font, xpos, ypos-1, swidth, lineHeight,
|
new SliderWidget(myTab, _font, xpos, ypos-1, swidth, lineHeight,
|
||||||
|
@ -209,47 +176,13 @@ void VideoDialog::addGeneralTab()
|
||||||
myVSizeAdjust->setMinValue(-5); myVSizeAdjust->setMaxValue(5);
|
myVSizeAdjust->setMinValue(-5); myVSizeAdjust->setMaxValue(5);
|
||||||
myVSizeAdjust->setTickmarkIntervals(2);
|
myVSizeAdjust->setTickmarkIntervals(2);
|
||||||
wid.push_back(myVSizeAdjust);
|
wid.push_back(myVSizeAdjust);
|
||||||
ypos += lineHeight + VGAP * 4;
|
|
||||||
|
|
||||||
// Speed
|
|
||||||
mySpeed =
|
|
||||||
new SliderWidget(myTab, _font, xpos, ypos-1, swidth, lineHeight,
|
|
||||||
"Emul. speed ", lwidth, kSpeedupChanged, fontWidth * 5, "%");
|
|
||||||
mySpeed->setMinValue(MIN_SPEED); mySpeed->setMaxValue(MAX_SPEED);
|
|
||||||
mySpeed->setStepValue(SPEED_STEP);
|
|
||||||
mySpeed->setTickmarkIntervals(2);
|
|
||||||
wid.push_back(mySpeed);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Use sync to vblank
|
|
||||||
myUseVSync = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "VSync");
|
|
||||||
wid.push_back(myUseVSync);
|
|
||||||
|
|
||||||
// Move over to the next column
|
|
||||||
xpos = myVSizeAdjust->getRight() + fontWidth * 3;
|
|
||||||
ypos = VBORDER;
|
|
||||||
|
|
||||||
// Skip progress load bars for SuperCharger ROMs
|
|
||||||
// Doesn't really belong here, but I couldn't find a better place for it
|
|
||||||
myFastSCBios = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Fast SuperCharger load");
|
|
||||||
wid.push_back(myFastSCBios);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Show UI messages onscreen
|
|
||||||
myUIMessages = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Show UI messages");
|
|
||||||
wid.push_back(myUIMessages);
|
|
||||||
ypos += lineHeight + VGAP;
|
|
||||||
|
|
||||||
// Use multi-threading
|
|
||||||
myUseThreads = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Multi-threading");
|
|
||||||
wid.push_back(myUseThreads);
|
|
||||||
|
|
||||||
// Add items for tab 0
|
// Add items for tab 0
|
||||||
addToFocusList(wid, myTab, tabID);
|
addToFocusList(wid, myTab, tabID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::addPaletteTab()
|
void VideoAudioDialog::addPaletteTab()
|
||||||
{
|
{
|
||||||
const int lineHeight = _font.getLineHeight(),
|
const int lineHeight = _font.getLineHeight(),
|
||||||
fontHeight = _font.getFontHeight(),
|
fontHeight = _font.getFontHeight(),
|
||||||
|
@ -265,7 +198,7 @@ void VideoDialog::addPaletteTab()
|
||||||
ypos = VBORDER;
|
ypos = VBORDER;
|
||||||
WidgetArray wid;
|
WidgetArray wid;
|
||||||
VariantList items;
|
VariantList items;
|
||||||
const int tabID = myTab->addTab(" Palettes ");
|
const int tabID = myTab->addTab(" Palettes ", TabWidget::AUTO_WIDTH);
|
||||||
|
|
||||||
// TIA Palette
|
// TIA Palette
|
||||||
items.clear();
|
items.clear();
|
||||||
|
@ -308,15 +241,16 @@ void VideoDialog::addPaletteTab()
|
||||||
CREATE_CUSTOM_SLIDERS(Gamma, "Gamma ", kPaletteUpdated)
|
CREATE_CUSTOM_SLIDERS(Gamma, "Gamma ", kPaletteUpdated)
|
||||||
|
|
||||||
// The resulting palette
|
// The resulting palette
|
||||||
addPalette(myPhaseShiftNtsc->getRight() + fontWidth * 2, VBORDER,
|
xpos = myPhaseShiftNtsc->getRight() + fontWidth * 2;
|
||||||
fontWidth * 2 * 8, myTVGamma->getBottom() - myTIAPalette->getTop());
|
addPalette(xpos, VBORDER, _w - 2 * 2 - HBORDER - xpos,
|
||||||
|
myTVGamma->getBottom() - myTIAPalette->getTop());
|
||||||
|
|
||||||
// Add items for tab 2
|
// Add items for tab 2
|
||||||
addToFocusList(wid, myTab, tabID);
|
addToFocusList(wid, myTab, tabID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::addTVEffectsTab()
|
void VideoAudioDialog::addTVEffectsTab()
|
||||||
{
|
{
|
||||||
const int lineHeight = _font.getLineHeight(),
|
const int lineHeight = _font.getLineHeight(),
|
||||||
fontHeight = _font.getFontHeight(),
|
fontHeight = _font.getFontHeight(),
|
||||||
|
@ -332,7 +266,7 @@ void VideoDialog::addTVEffectsTab()
|
||||||
const int pwidth = _font.getStringWidth("Bad adjust ");
|
const int pwidth = _font.getStringWidth("Bad adjust ");
|
||||||
WidgetArray wid;
|
WidgetArray wid;
|
||||||
VariantList items;
|
VariantList items;
|
||||||
const int tabID = myTab->addTab(" TV Effects ");
|
const int tabID = myTab->addTab(" TV Effects ", TabWidget::AUTO_WIDTH);
|
||||||
|
|
||||||
items.clear();
|
items.clear();
|
||||||
VarList::push_back(items, "Disabled", static_cast<uInt32>(NTSCFilter::Preset::OFF));
|
VarList::push_back(items, "Disabled", static_cast<uInt32>(NTSCFilter::Preset::OFF));
|
||||||
|
@ -403,11 +337,138 @@ void VideoDialog::addTVEffectsTab()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::loadConfig()
|
void VideoAudioDialog::addAudioTab()
|
||||||
{
|
{
|
||||||
|
const int lineHeight = _font.getLineHeight(),
|
||||||
|
fontHeight = _font.getFontHeight(),
|
||||||
|
fontWidth = _font.getMaxCharWidth();
|
||||||
|
const int VBORDER = fontHeight / 2;
|
||||||
|
const int HBORDER = fontWidth * 1.25;
|
||||||
|
const int INDENT = CheckboxWidget::prefixSize(_font);
|
||||||
|
const int VGAP = fontHeight / 4;
|
||||||
|
|
||||||
|
int xpos, ypos;
|
||||||
|
int lwidth = _font.getStringWidth("Volume "),
|
||||||
|
pwidth;
|
||||||
|
WidgetArray wid;
|
||||||
|
VariantList items;
|
||||||
|
const int tabID = myTab->addTab(" Audio ", TabWidget::AUTO_WIDTH);
|
||||||
|
|
||||||
|
xpos = HBORDER; ypos = VBORDER;
|
||||||
|
|
||||||
|
// Enable sound
|
||||||
|
mySoundEnableCheckbox = new CheckboxWidget(myTab, _font, xpos, ypos,
|
||||||
|
"Enable sound", kSoundEnableChanged);
|
||||||
|
wid.push_back(mySoundEnableCheckbox);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
xpos += CheckboxWidget::prefixSize(_font);
|
||||||
|
|
||||||
|
// Volume
|
||||||
|
myVolumeSlider = new SliderWidget(myTab, _font, xpos, ypos,
|
||||||
|
"Volume", lwidth, 0, 4 * fontWidth, "%");
|
||||||
|
myVolumeSlider->setMinValue(1); myVolumeSlider->setMaxValue(100);
|
||||||
|
myVolumeSlider->setTickmarkIntervals(4);
|
||||||
|
wid.push_back(myVolumeSlider);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Mode
|
||||||
|
items.clear();
|
||||||
|
VarList::push_back(items, "Low quality, medium lag", static_cast<int>(AudioSettings::Preset::lowQualityMediumLag));
|
||||||
|
VarList::push_back(items, "High quality, medium lag", static_cast<int>(AudioSettings::Preset::highQualityMediumLag));
|
||||||
|
VarList::push_back(items, "High quality, low lag", static_cast<int>(AudioSettings::Preset::highQualityLowLag));
|
||||||
|
VarList::push_back(items, "Ultra quality, minimal lag", static_cast<int>(AudioSettings::Preset::ultraQualityMinimalLag));
|
||||||
|
VarList::push_back(items, "Custom", static_cast<int>(AudioSettings::Preset::custom));
|
||||||
|
myModePopup = new PopUpWidget(myTab, _font, xpos, ypos,
|
||||||
|
_font.getStringWidth("Ultry quality, minimal lag"), lineHeight,
|
||||||
|
items, "Mode", lwidth, kModeChanged);
|
||||||
|
wid.push_back(myModePopup);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
xpos += INDENT;
|
||||||
|
|
||||||
|
// Fragment size
|
||||||
|
lwidth = _font.getStringWidth("Resampling quality ");
|
||||||
|
pwidth = myModePopup->getRight() - xpos - lwidth - PopUpWidget::dropDownWidth(_font);
|
||||||
|
items.clear();
|
||||||
|
VarList::push_back(items, "128 samples", 128);
|
||||||
|
VarList::push_back(items, "256 samples", 256);
|
||||||
|
VarList::push_back(items, "512 samples", 512);
|
||||||
|
VarList::push_back(items, "1k samples", 1024);
|
||||||
|
VarList::push_back(items, "2k samples", 2048);
|
||||||
|
VarList::push_back(items, "4K samples", 4096);
|
||||||
|
myFragsizePopup = new PopUpWidget(myTab, _font, xpos, ypos,
|
||||||
|
pwidth, lineHeight,
|
||||||
|
items, "Fragment size", lwidth);
|
||||||
|
wid.push_back(myFragsizePopup);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Output frequency
|
||||||
|
items.clear();
|
||||||
|
VarList::push_back(items, "44100 Hz", 44100);
|
||||||
|
VarList::push_back(items, "48000 Hz", 48000);
|
||||||
|
VarList::push_back(items, "96000 Hz", 96000);
|
||||||
|
myFreqPopup = new PopUpWidget(myTab, _font, xpos, ypos,
|
||||||
|
pwidth, lineHeight,
|
||||||
|
items, "Sample rate", lwidth);
|
||||||
|
wid.push_back(myFreqPopup);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Resampling quality
|
||||||
|
items.clear();
|
||||||
|
VarList::push_back(items, "Low", static_cast<int>(AudioSettings::ResamplingQuality::nearestNeightbour));
|
||||||
|
VarList::push_back(items, "High", static_cast<int>(AudioSettings::ResamplingQuality::lanczos_2));
|
||||||
|
VarList::push_back(items, "Ultra", static_cast<int>(AudioSettings::ResamplingQuality::lanczos_3));
|
||||||
|
myResamplingPopup = new PopUpWidget(myTab, _font, xpos, ypos,
|
||||||
|
pwidth, lineHeight,
|
||||||
|
items, "Resampling quality ", lwidth);
|
||||||
|
wid.push_back(myResamplingPopup);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Param 1
|
||||||
|
int swidth = pwidth + PopUpWidget::dropDownWidth(_font);
|
||||||
|
myHeadroomSlider = new SliderWidget(myTab, _font, xpos, ypos, swidth, lineHeight,
|
||||||
|
"Headroom ", 0, kHeadroomChanged, 10 * fontWidth);
|
||||||
|
myHeadroomSlider->setMinValue(0); myHeadroomSlider->setMaxValue(AudioSettings::MAX_HEADROOM);
|
||||||
|
myHeadroomSlider->setTickmarkIntervals(5);
|
||||||
|
wid.push_back(myHeadroomSlider);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Param 2
|
||||||
|
myBufferSizeSlider = new SliderWidget(myTab, _font, xpos, ypos, swidth, lineHeight,
|
||||||
|
"Buffer size ", 0, kBufferSizeChanged, 10 * fontWidth);
|
||||||
|
myBufferSizeSlider->setMinValue(0); myBufferSizeSlider->setMaxValue(AudioSettings::MAX_BUFFER_SIZE);
|
||||||
|
myBufferSizeSlider->setTickmarkIntervals(5);
|
||||||
|
wid.push_back(myBufferSizeSlider);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
// Stereo sound
|
||||||
|
xpos -= INDENT;
|
||||||
|
myStereoSoundCheckbox = new CheckboxWidget(myTab, _font, xpos, ypos,
|
||||||
|
"Stereo for all ROMs");
|
||||||
|
wid.push_back(myStereoSoundCheckbox);
|
||||||
|
ypos += lineHeight + VGAP;
|
||||||
|
|
||||||
|
swidth += INDENT - fontWidth * 4;
|
||||||
|
myDpcPitch = new SliderWidget(myTab, _font, xpos, ypos, swidth, lineHeight,
|
||||||
|
"Pitfall II music pitch ", 0, 0, 5 * fontWidth);
|
||||||
|
myDpcPitch->setMinValue(10000); myDpcPitch->setMaxValue(30000);
|
||||||
|
myDpcPitch->setStepValue(100);
|
||||||
|
myDpcPitch->setTickmarkIntervals(2);
|
||||||
|
wid.push_back(myDpcPitch);
|
||||||
|
|
||||||
|
// Add items for tab 4
|
||||||
|
addToFocusList(wid, myTab, tabID);
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void VideoAudioDialog::loadConfig()
|
||||||
|
{
|
||||||
|
// Display tab
|
||||||
// Renderer settings
|
// Renderer settings
|
||||||
myRenderer->setSelected(instance().settings().getString("video"), "default");
|
myRenderer->setSelected(instance().settings().getString("video"), "default");
|
||||||
|
|
||||||
|
// TIA interpolation
|
||||||
|
myTIAInterpolate->setState(instance().settings().getBool("tia.inter"));
|
||||||
|
|
||||||
// TIA zoom levels
|
// TIA zoom levels
|
||||||
// These are dynamically loaded, since they depend on the size of
|
// These are dynamically loaded, since they depend on the size of
|
||||||
// the desktop and which renderer we're using
|
// the desktop and which renderer we're using
|
||||||
|
@ -419,6 +480,21 @@ void VideoDialog::loadConfig()
|
||||||
myTIAZoom->setTickmarkIntervals((maxZoom - minZoom) * 2); // every ~50%
|
myTIAZoom->setTickmarkIntervals((maxZoom - minZoom) * 2); // every ~50%
|
||||||
myTIAZoom->setValue(instance().settings().getFloat("tia.zoom") * 100);
|
myTIAZoom->setValue(instance().settings().getFloat("tia.zoom") * 100);
|
||||||
|
|
||||||
|
// Fullscreen
|
||||||
|
myFullscreen->setState(instance().settings().getBool("fullscreen"));
|
||||||
|
/*string mode = instance().settings().getString("fullscreenmode");
|
||||||
|
myFullScreenMode->setSelected(mode);*/
|
||||||
|
// Fullscreen stretch setting
|
||||||
|
myUseStretch->setState(instance().settings().getBool("tia.fs_stretch"));
|
||||||
|
// Fullscreen overscan setting
|
||||||
|
myTVOverscan->setValue(instance().settings().getInt("tia.fs_overscan"));
|
||||||
|
handleFullScreenChange();
|
||||||
|
|
||||||
|
// Aspect ratio setting (NTSC and PAL)
|
||||||
|
myVSizeAdjust->setValue(instance().settings().getInt("tia.vsizeadjust"));
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Palettes tab
|
||||||
// TIA Palette
|
// TIA Palette
|
||||||
myPalette = instance().settings().getString("palette");
|
myPalette = instance().settings().getString("palette");
|
||||||
myTIAPalette->setSelected(myPalette, PaletteHandler::SETTING_STANDARD);
|
myTIAPalette->setSelected(myPalette, PaletteHandler::SETTING_STANDARD);
|
||||||
|
@ -435,39 +511,8 @@ void VideoDialog::loadConfig()
|
||||||
handlePaletteChange();
|
handlePaletteChange();
|
||||||
colorPalette();
|
colorPalette();
|
||||||
|
|
||||||
// TIA interpolation
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
myTIAInterpolate->setState(instance().settings().getBool("tia.inter"));
|
// TV Effects tab
|
||||||
|
|
||||||
// Aspect ratio setting (NTSC and PAL)
|
|
||||||
myVSizeAdjust->setValue(instance().settings().getInt("tia.vsizeadjust"));
|
|
||||||
|
|
||||||
// Emulation speed
|
|
||||||
int speed = mapSpeed(instance().settings().getFloat("speed"));
|
|
||||||
mySpeed->setValue(speed);
|
|
||||||
mySpeed->setValueLabel(formatSpeed(speed));
|
|
||||||
|
|
||||||
// Fullscreen
|
|
||||||
myFullscreen->setState(instance().settings().getBool("fullscreen"));
|
|
||||||
/*string mode = instance().settings().getString("fullscreenmode");
|
|
||||||
myFullScreenMode->setSelected(mode);*/
|
|
||||||
// Fullscreen stretch setting
|
|
||||||
myUseStretch->setState(instance().settings().getBool("tia.fs_stretch"));
|
|
||||||
// Fullscreen overscan setting
|
|
||||||
myTVOverscan->setValue(instance().settings().getInt("tia.fs_overscan"));
|
|
||||||
handleFullScreenChange();
|
|
||||||
|
|
||||||
// Use sync to vertical blank
|
|
||||||
myUseVSync->setState(instance().settings().getBool("vsync"));
|
|
||||||
|
|
||||||
// Show UI messages
|
|
||||||
myUIMessages->setState(instance().settings().getBool("uimessages"));
|
|
||||||
|
|
||||||
// Fast loading of Supercharger BIOS
|
|
||||||
myFastSCBios->setState(instance().settings().getBool("fastscbios"));
|
|
||||||
|
|
||||||
// Multi-threaded rendering
|
|
||||||
myUseThreads->setState(instance().settings().getBool("threads"));
|
|
||||||
|
|
||||||
// TV Mode
|
// TV Mode
|
||||||
myTVMode->setSelected(
|
myTVMode->setSelected(
|
||||||
instance().settings().getString("tv.filter"), "0");
|
instance().settings().getString("tv.filter"), "0");
|
||||||
|
@ -487,12 +532,60 @@ void VideoDialog::loadConfig()
|
||||||
// TV scanline intensity and interpolation
|
// TV scanline intensity and interpolation
|
||||||
myTVScanIntense->setValue(instance().settings().getInt("tv.scanlines"));
|
myTVScanIntense->setValue(instance().settings().getInt("tv.scanlines"));
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Audio tab
|
||||||
|
AudioSettings& audioSettings = instance().audioSettings();
|
||||||
|
|
||||||
|
// Enable sound
|
||||||
|
#ifndef SOUND_SUPPORT
|
||||||
|
mySoundEnableCheckbox->setState(audioSettings.enabled());
|
||||||
|
#else
|
||||||
|
mySoundEnableCheckbox->setState(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Volume
|
||||||
|
myVolumeSlider->setValue(audioSettings.volume());
|
||||||
|
|
||||||
|
// Stereo
|
||||||
|
myStereoSoundCheckbox->setState(audioSettings.stereo());
|
||||||
|
|
||||||
|
// DPC Pitch
|
||||||
|
myDpcPitch->setValue(audioSettings.dpcPitch());
|
||||||
|
|
||||||
|
// Preset / mode
|
||||||
|
myModePopup->setSelected(static_cast<int>(audioSettings.preset()));
|
||||||
|
|
||||||
|
updateSettingsWithPreset(instance().audioSettings());
|
||||||
|
|
||||||
|
updateEnabledState();
|
||||||
|
|
||||||
myTab->loadConfig();
|
myTab->loadConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::saveConfig()
|
void VideoAudioDialog::updateSettingsWithPreset(AudioSettings& audioSettings)
|
||||||
{
|
{
|
||||||
|
// Fragsize
|
||||||
|
myFragsizePopup->setSelected(audioSettings.fragmentSize());
|
||||||
|
|
||||||
|
// Output frequency
|
||||||
|
myFreqPopup->setSelected(audioSettings.sampleRate());
|
||||||
|
|
||||||
|
// Headroom
|
||||||
|
myHeadroomSlider->setValue(audioSettings.headroom());
|
||||||
|
|
||||||
|
// Buffer size
|
||||||
|
myBufferSizeSlider->setValue(audioSettings.bufferSize());
|
||||||
|
|
||||||
|
// Resampling quality
|
||||||
|
myResamplingPopup->setSelected(static_cast<int>(audioSettings.resamplingQuality()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void VideoAudioDialog::saveConfig()
|
||||||
|
{
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Display tab
|
||||||
// Renderer setting
|
// Renderer setting
|
||||||
instance().settings().setValue("video",
|
instance().settings().setValue("video",
|
||||||
myRenderer->getSelectedTag().toString());
|
myRenderer->getSelectedTag().toString());
|
||||||
|
@ -500,10 +593,6 @@ void VideoDialog::saveConfig()
|
||||||
// TIA interpolation
|
// TIA interpolation
|
||||||
instance().settings().setValue("tia.inter", myTIAInterpolate->getState());
|
instance().settings().setValue("tia.inter", myTIAInterpolate->getState());
|
||||||
|
|
||||||
|
|
||||||
// Note: Palette values are saved directly when changed!
|
|
||||||
|
|
||||||
|
|
||||||
// Fullscreen
|
// Fullscreen
|
||||||
instance().settings().setValue("fullscreen", myFullscreen->getState());
|
instance().settings().setValue("fullscreen", myFullscreen->getState());
|
||||||
// Fullscreen stretch setting
|
// Fullscreen stretch setting
|
||||||
|
@ -521,26 +610,12 @@ void VideoDialog::saveConfig()
|
||||||
|
|
||||||
instance().settings().setValue("tia.vsizeadjust", newAdjust);
|
instance().settings().setValue("tia.vsizeadjust", newAdjust);
|
||||||
|
|
||||||
// Speed
|
|
||||||
const int speedup = mySpeed->getValue();
|
|
||||||
instance().settings().setValue("speed", unmapSpeed(speedup));
|
|
||||||
if (instance().hasConsole())
|
|
||||||
instance().console().initializeAudio();
|
|
||||||
|
|
||||||
// Use sync to vertical blank
|
// Note: Palette values are saved directly when changed!
|
||||||
instance().settings().setValue("vsync", myUseVSync->getState());
|
|
||||||
|
|
||||||
// Show UI messages
|
|
||||||
instance().settings().setValue("uimessages", myUIMessages->getState());
|
|
||||||
|
|
||||||
// Fast loading of Supercharger BIOS
|
|
||||||
instance().settings().setValue("fastscbios", myFastSCBios->getState());
|
|
||||||
|
|
||||||
// Multi-threaded rendering
|
|
||||||
instance().settings().setValue("threads", myUseThreads->getState());
|
|
||||||
if (instance().hasConsole())
|
|
||||||
instance().frameBuffer().tiaSurface().ntsc().enableThreading(myUseThreads->getState());
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// TV Effects tab
|
||||||
// TV Mode
|
// TV Mode
|
||||||
instance().settings().setValue("tv.filter",
|
instance().settings().setValue("tv.filter",
|
||||||
myTVMode->getSelectedTag().toString());
|
myTVMode->getSelectedTag().toString());
|
||||||
|
@ -579,10 +654,51 @@ void VideoDialog::saveConfig()
|
||||||
|
|
||||||
// ... and apply potential setting changes to the TIA surface
|
// ... and apply potential setting changes to the TIA surface
|
||||||
instance().frameBuffer().tiaSurface().updateSurfaceSettings();
|
instance().frameBuffer().tiaSurface().updateSurfaceSettings();
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Audio tab
|
||||||
|
AudioSettings& audioSettings = instance().audioSettings();
|
||||||
|
|
||||||
|
// Enabled
|
||||||
|
audioSettings.setEnabled(mySoundEnableCheckbox->getState());
|
||||||
|
instance().sound().setEnabled(mySoundEnableCheckbox->getState());
|
||||||
|
|
||||||
|
// Volume
|
||||||
|
audioSettings.setVolume(myVolumeSlider->getValue());
|
||||||
|
instance().sound().setVolume(myVolumeSlider->getValue());
|
||||||
|
|
||||||
|
// Stereo
|
||||||
|
audioSettings.setStereo(myStereoSoundCheckbox->getState());
|
||||||
|
|
||||||
|
// DPC Pitch
|
||||||
|
audioSettings.setDpcPitch(myDpcPitch->getValue());
|
||||||
|
// update if current cart is Pitfall II
|
||||||
|
if (instance().hasConsole() && instance().console().cartridge().name() == "CartridgeDPC")
|
||||||
|
{
|
||||||
|
CartridgeDPC& cart = static_cast<CartridgeDPC&>(instance().console().cartridge());
|
||||||
|
cart.setDpcPitch(myDpcPitch->getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
AudioSettings::Preset preset = static_cast<AudioSettings::Preset>(myModePopup->getSelectedTag().toInt());
|
||||||
|
audioSettings.setPreset(preset);
|
||||||
|
|
||||||
|
if (preset == AudioSettings::Preset::custom) {
|
||||||
|
// Fragsize
|
||||||
|
audioSettings.setFragmentSize(myFragsizePopup->getSelectedTag().toInt());
|
||||||
|
audioSettings.setSampleRate(myFreqPopup->getSelectedTag().toInt());
|
||||||
|
audioSettings.setHeadroom(myHeadroomSlider->getValue());
|
||||||
|
audioSettings.setBufferSize(myBufferSizeSlider->getValue());
|
||||||
|
audioSettings.setResamplingQuality(static_cast<AudioSettings::ResamplingQuality>(myResamplingPopup->getSelectedTag().toInt()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only force a re-initialization when necessary, since it can
|
||||||
|
// be a time-consuming operation
|
||||||
|
if(instance().hasConsole())
|
||||||
|
instance().console().initializeAudio();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::setDefaults()
|
void VideoAudioDialog::setDefaults()
|
||||||
{
|
{
|
||||||
switch(myTab->getActiveTab())
|
switch(myTab->getActiveTab())
|
||||||
{
|
{
|
||||||
|
@ -597,13 +713,6 @@ void VideoDialog::setDefaults()
|
||||||
myTVOverscan->setValue(0);
|
myTVOverscan->setValue(0);
|
||||||
myTIAZoom->setValue(300);
|
myTIAZoom->setValue(300);
|
||||||
myVSizeAdjust->setValue(0);
|
myVSizeAdjust->setValue(0);
|
||||||
// speed
|
|
||||||
mySpeed->setValue(0);
|
|
||||||
myUseVSync->setState(true);
|
|
||||||
// misc
|
|
||||||
myUIMessages->setState(true);
|
|
||||||
myFastSCBios->setState(true);
|
|
||||||
myUseThreads->setState(false);
|
|
||||||
|
|
||||||
handleFullScreenChange();
|
handleFullScreenChange();
|
||||||
break;
|
break;
|
||||||
|
@ -640,11 +749,29 @@ void VideoDialog::setDefaults()
|
||||||
loadTVAdjustables(NTSCFilter::Preset::CUSTOM);
|
loadTVAdjustables(NTSCFilter::Preset::CUSTOM);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 3: // Audio
|
||||||
|
mySoundEnableCheckbox->setState(AudioSettings::DEFAULT_ENABLED);
|
||||||
|
myVolumeSlider->setValue(AudioSettings::DEFAULT_VOLUME);
|
||||||
|
myStereoSoundCheckbox->setState(AudioSettings::DEFAULT_STEREO);
|
||||||
|
myDpcPitch->setValue(AudioSettings::DEFAULT_DPC_PITCH);
|
||||||
|
myModePopup->setSelected(static_cast<int>(AudioSettings::DEFAULT_PRESET));
|
||||||
|
|
||||||
|
if (AudioSettings::DEFAULT_PRESET == AudioSettings::Preset::custom) {
|
||||||
|
myResamplingPopup->setSelected(static_cast<int>(AudioSettings::DEFAULT_RESAMPLING_QUALITY));
|
||||||
|
myFragsizePopup->setSelected(AudioSettings::DEFAULT_FRAGMENT_SIZE);
|
||||||
|
myFreqPopup->setSelected(AudioSettings::DEFAULT_SAMPLE_RATE);
|
||||||
|
myHeadroomSlider->setValue(AudioSettings::DEFAULT_HEADROOM);
|
||||||
|
myBufferSizeSlider->setValue(AudioSettings::DEFAULT_BUFFER_SIZE);
|
||||||
|
}
|
||||||
|
else updatePreset();
|
||||||
|
|
||||||
|
updateEnabledState();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::handleTVModeChange(NTSCFilter::Preset preset)
|
void VideoAudioDialog::handleTVModeChange(NTSCFilter::Preset preset)
|
||||||
{
|
{
|
||||||
bool enable = preset == NTSCFilter::Preset::CUSTOM;
|
bool enable = preset == NTSCFilter::Preset::CUSTOM;
|
||||||
|
|
||||||
|
@ -661,7 +788,7 @@ void VideoDialog::handleTVModeChange(NTSCFilter::Preset preset)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::loadTVAdjustables(NTSCFilter::Preset preset)
|
void VideoAudioDialog::loadTVAdjustables(NTSCFilter::Preset preset)
|
||||||
{
|
{
|
||||||
NTSCFilter::Adjustable adj;
|
NTSCFilter::Adjustable adj;
|
||||||
instance().frameBuffer().tiaSurface().ntsc().getAdjustables(
|
instance().frameBuffer().tiaSurface().ntsc().getAdjustables(
|
||||||
|
@ -674,7 +801,7 @@ void VideoDialog::loadTVAdjustables(NTSCFilter::Preset preset)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::handlePaletteChange()
|
void VideoAudioDialog::handlePaletteChange()
|
||||||
{
|
{
|
||||||
bool enable = myTIAPalette->getSelectedTag().toString() == "custom";
|
bool enable = myTIAPalette->getSelectedTag().toString() == "custom";
|
||||||
|
|
||||||
|
@ -683,7 +810,7 @@ void VideoDialog::handlePaletteChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::handlePaletteUpdate()
|
void VideoAudioDialog::handlePaletteUpdate()
|
||||||
{
|
{
|
||||||
// TIA Palette
|
// TIA Palette
|
||||||
instance().settings().setValue("palette",
|
instance().settings().setValue("palette",
|
||||||
|
@ -704,7 +831,7 @@ void VideoDialog::handlePaletteUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::handleFullScreenChange()
|
void VideoAudioDialog::handleFullScreenChange()
|
||||||
{
|
{
|
||||||
bool enable = myFullscreen->getState();
|
bool enable = myFullscreen->getState();
|
||||||
myUseStretch->setEnabled(enable);
|
myUseStretch->setEnabled(enable);
|
||||||
|
@ -712,7 +839,7 @@ void VideoDialog::handleFullScreenChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::handleOverscanChange()
|
void VideoAudioDialog::handleOverscanChange()
|
||||||
{
|
{
|
||||||
if (myTVOverscan->getValue() == 0)
|
if (myTVOverscan->getValue() == 0)
|
||||||
{
|
{
|
||||||
|
@ -724,13 +851,13 @@ void VideoDialog::handleOverscanChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::handlePhosphorChange()
|
void VideoAudioDialog::handlePhosphorChange()
|
||||||
{
|
{
|
||||||
myTVPhosLevel->setEnabled(myTVPhosphor->getState());
|
myTVPhosLevel->setEnabled(myTVPhosphor->getState());
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::handleCommand(CommandSender* sender, int cmd,
|
void VideoAudioDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
int data, int id)
|
int data, int id)
|
||||||
{
|
{
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
|
@ -793,11 +920,6 @@ void VideoDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
myVSizeAdjust->setValueUnit("%");
|
myVSizeAdjust->setValueUnit("%");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case kSpeedupChanged:
|
|
||||||
mySpeed->setValueLabel(formatSpeed(mySpeed->getValue()));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kFullScreenChanged:
|
case kFullScreenChanged:
|
||||||
handleFullScreenChange();
|
handleFullScreenChange();
|
||||||
break;
|
break;
|
||||||
|
@ -845,6 +967,30 @@ void VideoDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
myTVPhosLevel->setValueUnit("%");
|
myTVPhosLevel->setValueUnit("%");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kSoundEnableChanged:
|
||||||
|
updateEnabledState();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case kModeChanged:
|
||||||
|
updatePreset();
|
||||||
|
updateEnabledState();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case kHeadroomChanged:
|
||||||
|
{
|
||||||
|
std::ostringstream ss;
|
||||||
|
ss << std::fixed << std::setprecision(1) << (0.5 * myHeadroomSlider->getValue()) << " frames";
|
||||||
|
myHeadroomSlider->setValueLabel(ss.str());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case kBufferSizeChanged:
|
||||||
|
{
|
||||||
|
std::ostringstream ss;
|
||||||
|
ss << std::fixed << std::setprecision(1) << (0.5 * myBufferSizeSlider->getValue()) << " frames";
|
||||||
|
myBufferSizeSlider->setValueLabel(ss.str());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Dialog::handleCommand(sender, cmd, data, 0);
|
Dialog::handleCommand(sender, cmd, data, 0);
|
||||||
break;
|
break;
|
||||||
|
@ -852,7 +998,7 @@ void VideoDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::addPalette(int x, int y, int w, int h)
|
void VideoAudioDialog::addPalette(int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
if(instance().hasConsole())
|
if(instance().hasConsole())
|
||||||
{
|
{
|
||||||
|
@ -877,7 +1023,7 @@ void VideoDialog::addPalette(int x, int y, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::colorPalette()
|
void VideoAudioDialog::colorPalette()
|
||||||
{
|
{
|
||||||
if(instance().hasConsole())
|
if(instance().hasConsole())
|
||||||
{
|
{
|
||||||
|
@ -904,3 +1050,37 @@ void VideoDialog::colorPalette()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void VideoAudioDialog::updateEnabledState()
|
||||||
|
{
|
||||||
|
bool active = mySoundEnableCheckbox->getState();
|
||||||
|
AudioSettings::Preset preset = static_cast<AudioSettings::Preset>(myModePopup->getSelectedTag().toInt());
|
||||||
|
bool userMode = preset == AudioSettings::Preset::custom;
|
||||||
|
|
||||||
|
myVolumeSlider->setEnabled(active);
|
||||||
|
myStereoSoundCheckbox->setEnabled(active);
|
||||||
|
myModePopup->setEnabled(active);
|
||||||
|
// enable only for Pitfall II cart
|
||||||
|
myDpcPitch->setEnabled(active && instance().hasConsole() && instance().console().cartridge().name() == "CartridgeDPC");
|
||||||
|
|
||||||
|
myFragsizePopup->setEnabled(active && userMode);
|
||||||
|
myFreqPopup->setEnabled(active && userMode);
|
||||||
|
myResamplingPopup->setEnabled(active && userMode);
|
||||||
|
myHeadroomSlider->setEnabled(active && userMode);
|
||||||
|
myBufferSizeSlider->setEnabled(active && userMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void VideoAudioDialog::updatePreset()
|
||||||
|
{
|
||||||
|
AudioSettings::Preset preset = static_cast<AudioSettings::Preset>(myModePopup->getSelectedTag().toInt());
|
||||||
|
|
||||||
|
// Make a copy that does not affect the actual settings...
|
||||||
|
AudioSettings audioSettings = instance().audioSettings();
|
||||||
|
audioSettings.setPersistent(false);
|
||||||
|
// ... and set the requested preset
|
||||||
|
audioSettings.setPreset(preset);
|
||||||
|
|
||||||
|
updateSettingsWithPreset(audioSettings);
|
||||||
|
}
|
|
@ -15,8 +15,8 @@
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef VIDEO_DIALOG_HXX
|
#ifndef VIDEOAUDIO_DIALOG_HXX
|
||||||
#define VIDEO_DIALOG_HXX
|
#define VIDEOAUDIO_DIALOG_HXX
|
||||||
|
|
||||||
class CommandSender;
|
class CommandSender;
|
||||||
class CheckboxWidget;
|
class CheckboxWidget;
|
||||||
|
@ -34,21 +34,22 @@ class OSystem;
|
||||||
#include "NTSCFilter.hxx"
|
#include "NTSCFilter.hxx"
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
class VideoDialog : public Dialog
|
class VideoAudioDialog : public Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VideoDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font,
|
VideoAudioDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font,
|
||||||
int max_w, int max_h);
|
int max_w, int max_h);
|
||||||
virtual ~VideoDialog() = default;
|
virtual ~VideoAudioDialog() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void loadConfig() override;
|
void loadConfig() override;
|
||||||
void saveConfig() override;
|
void saveConfig() override;
|
||||||
void setDefaults() override;
|
void setDefaults() override;
|
||||||
|
|
||||||
void addGeneralTab();
|
void addDisplayTab();
|
||||||
void addPaletteTab();
|
void addPaletteTab();
|
||||||
void addTVEffectsTab();
|
void addTVEffectsTab();
|
||||||
|
void addAudioTab();
|
||||||
void handleTVModeChange(NTSCFilter::Preset);
|
void handleTVModeChange(NTSCFilter::Preset);
|
||||||
void loadTVAdjustables(NTSCFilter::Preset preset);
|
void loadTVAdjustables(NTSCFilter::Preset preset);
|
||||||
void handlePaletteChange();
|
void handlePaletteChange();
|
||||||
|
@ -59,45 +60,30 @@ class VideoDialog : public Dialog
|
||||||
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
||||||
void addPalette(int x, int y, int h, int w);
|
void addPalette(int x, int y, int h, int w);
|
||||||
void colorPalette();
|
void colorPalette();
|
||||||
|
void updatePreset();
|
||||||
|
void updateEnabledState();
|
||||||
|
void updateSettingsWithPreset(AudioSettings&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TabWidget* myTab;
|
TabWidget* myTab;
|
||||||
|
|
||||||
// General options
|
// General options
|
||||||
PopUpWidget* myRenderer{nullptr};
|
PopUpWidget* myRenderer{nullptr};
|
||||||
SliderWidget* myTIAZoom{nullptr};
|
|
||||||
PopUpWidget* myTIAPalette{nullptr};
|
|
||||||
SliderWidget* myPhaseShiftNtsc{nullptr};
|
|
||||||
SliderWidget* myPhaseShiftPal{nullptr};
|
|
||||||
CheckboxWidget* myTIAInterpolate{nullptr};
|
CheckboxWidget* myTIAInterpolate{nullptr};
|
||||||
SliderWidget* myVSizeAdjust{nullptr};
|
|
||||||
SliderWidget* mySpeed{nullptr};
|
|
||||||
|
|
||||||
RadioButtonGroup* myZoomGroup{nullptr};
|
|
||||||
CheckboxWidget* myFullscreen{nullptr};
|
CheckboxWidget* myFullscreen{nullptr};
|
||||||
//PopUpWidget* myFullScreenMode;
|
//PopUpWidget* myFullScreenMode;
|
||||||
CheckboxWidget* myUseStretch{nullptr};
|
CheckboxWidget* myUseStretch{nullptr};
|
||||||
SliderWidget* myTVOverscan{nullptr};
|
SliderWidget* myTVOverscan{nullptr};
|
||||||
CheckboxWidget* myUseVSync{nullptr};
|
SliderWidget* myTIAZoom{nullptr};
|
||||||
CheckboxWidget* myUIMessages{nullptr};
|
SliderWidget* myVSizeAdjust{nullptr};
|
||||||
CheckboxWidget* myFastSCBios{nullptr};
|
|
||||||
CheckboxWidget* myUseThreads{nullptr};
|
|
||||||
std::array<StaticTextWidget*, 16> myColorLbl{nullptr};
|
|
||||||
//std::array<ColorWidget*, 16> myColor{nullptr};
|
|
||||||
ColorWidget* myColor[16][8]{nullptr};
|
|
||||||
|
|
||||||
// TV effects adjustables (custom mode)
|
// TV effects adjustables (custom mode)
|
||||||
PopUpWidget* myTVMode{nullptr};
|
PopUpWidget* myTVMode{nullptr};
|
||||||
SliderWidget* myTVSharp{nullptr};
|
SliderWidget* myTVSharp{nullptr};
|
||||||
SliderWidget* myTVHue{nullptr};
|
|
||||||
SliderWidget* myTVRes{nullptr};
|
SliderWidget* myTVRes{nullptr};
|
||||||
SliderWidget* myTVArtifacts{nullptr};
|
SliderWidget* myTVArtifacts{nullptr};
|
||||||
SliderWidget* myTVFringe{nullptr};
|
SliderWidget* myTVFringe{nullptr};
|
||||||
SliderWidget* myTVBleed{nullptr};
|
SliderWidget* myTVBleed{nullptr};
|
||||||
SliderWidget* myTVBright{nullptr};
|
|
||||||
SliderWidget* myTVContrast{nullptr};
|
|
||||||
SliderWidget* myTVSatur{nullptr};
|
|
||||||
SliderWidget* myTVGamma{nullptr};
|
|
||||||
|
|
||||||
// TV phosphor effect
|
// TV phosphor effect
|
||||||
CheckboxWidget* myTVPhosphor{nullptr};
|
CheckboxWidget* myTVPhosphor{nullptr};
|
||||||
|
@ -114,19 +100,43 @@ class VideoDialog : public Dialog
|
||||||
ButtonWidget* myCloneBad{nullptr};
|
ButtonWidget* myCloneBad{nullptr};
|
||||||
ButtonWidget* myCloneCustom{nullptr};
|
ButtonWidget* myCloneCustom{nullptr};
|
||||||
|
|
||||||
|
// Palettes
|
||||||
|
PopUpWidget* myTIAPalette{nullptr};
|
||||||
|
SliderWidget* myPhaseShiftNtsc{nullptr};
|
||||||
|
SliderWidget* myPhaseShiftPal{nullptr};
|
||||||
|
SliderWidget* myTVHue{nullptr};
|
||||||
|
SliderWidget* myTVSatur{nullptr};
|
||||||
|
SliderWidget* myTVBright{nullptr};
|
||||||
|
SliderWidget* myTVContrast{nullptr};
|
||||||
|
SliderWidget* myTVGamma{nullptr};
|
||||||
|
std::array<StaticTextWidget*, 16> myColorLbl{nullptr};
|
||||||
|
ColorWidget* myColor[16][8]{nullptr};
|
||||||
|
|
||||||
|
// Audio
|
||||||
|
CheckboxWidget* mySoundEnableCheckbox{nullptr};
|
||||||
|
SliderWidget* myVolumeSlider{nullptr};
|
||||||
|
CheckboxWidget* myStereoSoundCheckbox{nullptr};
|
||||||
|
PopUpWidget* myModePopup{nullptr};
|
||||||
|
PopUpWidget* myFragsizePopup{nullptr};
|
||||||
|
PopUpWidget* myFreqPopup{nullptr};
|
||||||
|
PopUpWidget* myResamplingPopup{nullptr};
|
||||||
|
SliderWidget* myHeadroomSlider{nullptr};
|
||||||
|
SliderWidget* myBufferSizeSlider{nullptr};
|
||||||
|
SliderWidget* myDpcPitch{nullptr};
|
||||||
|
|
||||||
string myPalette;
|
string myPalette;
|
||||||
PaletteHandler::Adjustable myPaletteAdj{0.0F};
|
PaletteHandler::Adjustable myPaletteAdj{0.0F};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
kZoomChanged = 'VDZo',
|
||||||
|
kVSizeChanged = 'VDVs',
|
||||||
|
kFullScreenChanged = 'VDFs',
|
||||||
|
kOverscanChanged = 'VDOv',
|
||||||
|
|
||||||
kPaletteChanged = 'VDpl',
|
kPaletteChanged = 'VDpl',
|
||||||
kNtscShiftChanged = 'VDns',
|
kNtscShiftChanged = 'VDns',
|
||||||
kPalShiftChanged = 'VDps',
|
kPalShiftChanged = 'VDps',
|
||||||
kPaletteUpdated = 'VDpu',
|
kPaletteUpdated = 'VDpu',
|
||||||
kSpeedupChanged = 'VDSp',
|
|
||||||
kVSizeChanged = 'VDVs',
|
|
||||||
kFullScreenChanged = 'VDFs',
|
|
||||||
kZoomChanged = 'VDZo',
|
|
||||||
kOverscanChanged = 'VDOv',
|
|
||||||
|
|
||||||
kTVModeChanged = 'VDtv',
|
kTVModeChanged = 'VDtv',
|
||||||
kCloneCompositeCmd = 'CLcp',
|
kCloneCompositeCmd = 'CLcp',
|
||||||
|
@ -136,16 +146,21 @@ class VideoDialog : public Dialog
|
||||||
kCloneCustomCmd = 'CLcu',
|
kCloneCustomCmd = 'CLcu',
|
||||||
kPhosphorChanged = 'VDph',
|
kPhosphorChanged = 'VDph',
|
||||||
kPhosBlendChanged = 'VDbl',
|
kPhosBlendChanged = 'VDbl',
|
||||||
kScanlinesChanged = 'VDsc'
|
kScanlinesChanged = 'VDsc',
|
||||||
|
|
||||||
|
kSoundEnableChanged = 'ADse',
|
||||||
|
kModeChanged = 'ADmc',
|
||||||
|
kHeadroomChanged = 'ADhc',
|
||||||
|
kBufferSizeChanged = 'ADbc'
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Following constructors and assignment operators not supported
|
// Following constructors and assignment operators not supported
|
||||||
VideoDialog() = delete;
|
VideoAudioDialog() = delete;
|
||||||
VideoDialog(const VideoDialog&) = delete;
|
VideoAudioDialog(const VideoAudioDialog&) = delete;
|
||||||
VideoDialog(VideoDialog&&) = delete;
|
VideoAudioDialog(VideoAudioDialog&&) = delete;
|
||||||
VideoDialog& operator=(const VideoDialog&) = delete;
|
VideoAudioDialog& operator=(const VideoAudioDialog&) = delete;
|
||||||
VideoDialog& operator=(VideoDialog&&) = delete;
|
VideoAudioDialog& operator=(VideoAudioDialog&&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -2,7 +2,6 @@ MODULE := src/gui
|
||||||
|
|
||||||
MODULE_OBJS := \
|
MODULE_OBJS := \
|
||||||
src/gui/AboutDialog.o \
|
src/gui/AboutDialog.o \
|
||||||
src/gui/AudioDialog.o \
|
|
||||||
src/gui/BrowserDialog.o \
|
src/gui/BrowserDialog.o \
|
||||||
src/gui/CheckListWidget.o \
|
src/gui/CheckListWidget.o \
|
||||||
src/gui/ColorWidget.o \
|
src/gui/ColorWidget.o \
|
||||||
|
@ -15,6 +14,7 @@ MODULE_OBJS := \
|
||||||
src/gui/Dialog.o \
|
src/gui/Dialog.o \
|
||||||
src/gui/EditableWidget.o \
|
src/gui/EditableWidget.o \
|
||||||
src/gui/EditTextWidget.o \
|
src/gui/EditTextWidget.o \
|
||||||
|
src/gui/EmulationDialog.o \
|
||||||
src/gui/EventMappingWidget.o \
|
src/gui/EventMappingWidget.o \
|
||||||
src/gui/FileListWidget.o \
|
src/gui/FileListWidget.o \
|
||||||
src/gui/Font.o \
|
src/gui/Font.o \
|
||||||
|
@ -49,7 +49,7 @@ MODULE_OBJS := \
|
||||||
src/gui/TimeMachineDialog.o \
|
src/gui/TimeMachineDialog.o \
|
||||||
src/gui/TimeMachine.o \
|
src/gui/TimeMachine.o \
|
||||||
src/gui/UIDialog.o \
|
src/gui/UIDialog.o \
|
||||||
src/gui/VideoDialog.o \
|
src/gui/VideoAudioDialog.o \
|
||||||
src/gui/Widget.o
|
src/gui/Widget.o
|
||||||
|
|
||||||
MODULE_DIRS += \
|
MODULE_DIRS += \
|
||||||
|
|
|
@ -230,7 +230,7 @@
|
||||||
* the type.
|
* the type.
|
||||||
*/
|
*/
|
||||||
# ifndef PNG_EXPORT_TYPE
|
# ifndef PNG_EXPORT_TYPE
|
||||||
# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP
|
# define PNG_EXPORT_TYPE(name) name PNG_IMPEXP
|
||||||
# endif
|
# endif
|
||||||
# define PNG_DLL_EXPORT __export
|
# define PNG_DLL_EXPORT __export
|
||||||
# else /* newer compiler */
|
# else /* newer compiler */
|
||||||
|
@ -450,7 +450,7 @@
|
||||||
# define PNG_FP_EXPORT(ordinal, type, name, args)\
|
# define PNG_FP_EXPORT(ordinal, type, name, args)\
|
||||||
PNG_EXPORT(ordinal, type, name, args);
|
PNG_EXPORT(ordinal, type, name, args);
|
||||||
# else /* No floating point APIs */
|
# else /* No floating point APIs */
|
||||||
# define PNG_FP_EXPORT(ordinal, type, name, args)
|
# define PNG_FP_EXPORT(ordinal, name, name, args)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef PNG_FIXED_EXPORT /* A fixed point API. */
|
#ifndef PNG_FIXED_EXPORT /* A fixed point API. */
|
||||||
|
@ -458,7 +458,7 @@
|
||||||
# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
|
# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
|
||||||
PNG_EXPORT(ordinal, type, name, args);
|
PNG_EXPORT(ordinal, type, name, args);
|
||||||
# else /* No fixed point APIs */
|
# else /* No fixed point APIs */
|
||||||
# define PNG_FIXED_EXPORT(ordinal, type, name, args)
|
# define PNG_FIXED_EXPORT(ordinal, name, name, args)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -758,6 +758,7 @@
|
||||||
<ClCompile Include="..\emucore\tia\TIA.cxx" />
|
<ClCompile Include="..\emucore\tia\TIA.cxx" />
|
||||||
<ClCompile Include="..\gui\ColorWidget.cxx" />
|
<ClCompile Include="..\gui\ColorWidget.cxx" />
|
||||||
<ClCompile Include="..\gui\DeveloperDialog.cxx" />
|
<ClCompile Include="..\gui\DeveloperDialog.cxx" />
|
||||||
|
<ClCompile Include="..\gui\EmulationDialog.cxx" />
|
||||||
<ClCompile Include="..\gui\FileListWidget.cxx" />
|
<ClCompile Include="..\gui\FileListWidget.cxx" />
|
||||||
<ClCompile Include="..\gui\JoystickDialog.cxx" />
|
<ClCompile Include="..\gui\JoystickDialog.cxx" />
|
||||||
<ClCompile Include="..\gui\LoggerDialog.cxx" />
|
<ClCompile Include="..\gui\LoggerDialog.cxx" />
|
||||||
|
@ -907,7 +908,6 @@
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|x64'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\gui\AboutDialog.cxx" />
|
<ClCompile Include="..\gui\AboutDialog.cxx" />
|
||||||
<ClCompile Include="..\gui\AudioDialog.cxx" />
|
|
||||||
<ClCompile Include="..\gui\BrowserDialog.cxx" />
|
<ClCompile Include="..\gui\BrowserDialog.cxx" />
|
||||||
<ClCompile Include="..\gui\CheckListWidget.cxx" />
|
<ClCompile Include="..\gui\CheckListWidget.cxx" />
|
||||||
<ClCompile Include="..\gui\ComboDialog.cxx" />
|
<ClCompile Include="..\gui\ComboDialog.cxx" />
|
||||||
|
@ -939,7 +939,7 @@
|
||||||
<ClCompile Include="..\gui\StringListWidget.cxx" />
|
<ClCompile Include="..\gui\StringListWidget.cxx" />
|
||||||
<ClCompile Include="..\gui\TabWidget.cxx" />
|
<ClCompile Include="..\gui\TabWidget.cxx" />
|
||||||
<ClCompile Include="..\gui\UIDialog.cxx" />
|
<ClCompile Include="..\gui\UIDialog.cxx" />
|
||||||
<ClCompile Include="..\gui\VideoDialog.cxx" />
|
<ClCompile Include="..\gui\VideoAudioDialog.cxx" />
|
||||||
<ClCompile Include="..\gui\Widget.cxx" />
|
<ClCompile Include="..\gui\Widget.cxx" />
|
||||||
<ClCompile Include="..\zlib\adler32.c">
|
<ClCompile Include="..\zlib\adler32.c">
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
|
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
|
||||||
|
@ -1791,6 +1791,7 @@
|
||||||
<ClInclude Include="..\gui\ConsoleMediumBFont.hxx" />
|
<ClInclude Include="..\gui\ConsoleMediumBFont.hxx" />
|
||||||
<ClInclude Include="..\gui\ConsoleMediumFont.hxx" />
|
<ClInclude Include="..\gui\ConsoleMediumFont.hxx" />
|
||||||
<ClInclude Include="..\gui\DeveloperDialog.hxx" />
|
<ClInclude Include="..\gui\DeveloperDialog.hxx" />
|
||||||
|
<ClInclude Include="..\gui\EmulationDialog.hxx" />
|
||||||
<ClInclude Include="..\gui\FileListWidget.hxx" />
|
<ClInclude Include="..\gui\FileListWidget.hxx" />
|
||||||
<ClInclude Include="..\gui\JoystickDialog.hxx" />
|
<ClInclude Include="..\gui\JoystickDialog.hxx" />
|
||||||
<ClInclude Include="..\gui\LoggerDialog.hxx" />
|
<ClInclude Include="..\gui\LoggerDialog.hxx" />
|
||||||
|
@ -1967,7 +1968,6 @@
|
||||||
<ClInclude Include="..\cheat\CheetahCheat.hxx" />
|
<ClInclude Include="..\cheat\CheetahCheat.hxx" />
|
||||||
<ClInclude Include="..\cheat\RamCheat.hxx" />
|
<ClInclude Include="..\cheat\RamCheat.hxx" />
|
||||||
<ClInclude Include="..\gui\AboutDialog.hxx" />
|
<ClInclude Include="..\gui\AboutDialog.hxx" />
|
||||||
<ClInclude Include="..\gui\AudioDialog.hxx" />
|
|
||||||
<ClInclude Include="..\gui\BrowserDialog.hxx" />
|
<ClInclude Include="..\gui\BrowserDialog.hxx" />
|
||||||
<ClInclude Include="..\gui\CheckListWidget.hxx" />
|
<ClInclude Include="..\gui\CheckListWidget.hxx" />
|
||||||
<ClInclude Include="..\gui\ComboDialog.hxx" />
|
<ClInclude Include="..\gui\ComboDialog.hxx" />
|
||||||
|
@ -2003,7 +2003,7 @@
|
||||||
<ClInclude Include="..\gui\StringListWidget.hxx" />
|
<ClInclude Include="..\gui\StringListWidget.hxx" />
|
||||||
<ClInclude Include="..\gui\TabWidget.hxx" />
|
<ClInclude Include="..\gui\TabWidget.hxx" />
|
||||||
<ClInclude Include="..\gui\UIDialog.hxx" />
|
<ClInclude Include="..\gui\UIDialog.hxx" />
|
||||||
<ClInclude Include="..\gui\VideoDialog.hxx" />
|
<ClInclude Include="..\gui\VideoAudioDialog.hxx" />
|
||||||
<ClInclude Include="..\gui\Widget.hxx" />
|
<ClInclude Include="..\gui\Widget.hxx" />
|
||||||
<ClInclude Include="..\zlib\crc32.h" />
|
<ClInclude Include="..\zlib\crc32.h" />
|
||||||
<ClInclude Include="..\zlib\deflate.h" />
|
<ClInclude Include="..\zlib\deflate.h" />
|
||||||
|
|
|
@ -342,9 +342,6 @@
|
||||||
<ClCompile Include="..\gui\AboutDialog.cxx">
|
<ClCompile Include="..\gui\AboutDialog.cxx">
|
||||||
<Filter>Source Files\gui</Filter>
|
<Filter>Source Files\gui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\gui\AudioDialog.cxx">
|
|
||||||
<Filter>Source Files\gui</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\gui\BrowserDialog.cxx">
|
<ClCompile Include="..\gui\BrowserDialog.cxx">
|
||||||
<Filter>Source Files\gui</Filter>
|
<Filter>Source Files\gui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -438,9 +435,6 @@
|
||||||
<ClCompile Include="..\gui\UIDialog.cxx">
|
<ClCompile Include="..\gui\UIDialog.cxx">
|
||||||
<Filter>Source Files\gui</Filter>
|
<Filter>Source Files\gui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\gui\VideoDialog.cxx">
|
|
||||||
<Filter>Source Files\gui</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\gui\Widget.cxx">
|
<ClCompile Include="..\gui\Widget.cxx">
|
||||||
<Filter>Source Files\gui</Filter>
|
<Filter>Source Files\gui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -1005,6 +999,12 @@
|
||||||
<ClCompile Include="..\common\PaletteHandler.cxx">
|
<ClCompile Include="..\common\PaletteHandler.cxx">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\gui\EmulationDialog.cxx">
|
||||||
|
<Filter>Source Files\gui</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\gui\VideoAudioDialog.cxx">
|
||||||
|
<Filter>Source Files\gui</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\common\bspf.hxx">
|
<ClInclude Include="..\common\bspf.hxx">
|
||||||
|
@ -1316,9 +1316,6 @@
|
||||||
<ClInclude Include="..\gui\AboutDialog.hxx">
|
<ClInclude Include="..\gui\AboutDialog.hxx">
|
||||||
<Filter>Header Files\gui</Filter>
|
<Filter>Header Files\gui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\gui\AudioDialog.hxx">
|
|
||||||
<Filter>Header Files\gui</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\gui\BrowserDialog.hxx">
|
<ClInclude Include="..\gui\BrowserDialog.hxx">
|
||||||
<Filter>Header Files\gui</Filter>
|
<Filter>Header Files\gui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -1424,9 +1421,6 @@
|
||||||
<ClInclude Include="..\gui\UIDialog.hxx">
|
<ClInclude Include="..\gui\UIDialog.hxx">
|
||||||
<Filter>Header Files\gui</Filter>
|
<Filter>Header Files\gui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\gui\VideoDialog.hxx">
|
|
||||||
<Filter>Header Files\gui</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\gui\Widget.hxx">
|
<ClInclude Include="..\gui\Widget.hxx">
|
||||||
<Filter>Header Files\gui</Filter>
|
<Filter>Header Files\gui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -2063,6 +2057,12 @@
|
||||||
<ClInclude Include="..\common\PaletteHandler.hxx">
|
<ClInclude Include="..\common\PaletteHandler.hxx">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\gui\EmulationDialog.hxx">
|
||||||
|
<Filter>Header Files\gui</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\gui\VideoAudioDialog.hxx">
|
||||||
|
<Filter>Header Files\gui</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="stella.ico">
|
<None Include="stella.ico">
|
||||||
|
|
Loading…
Reference in New Issue