Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DolphinQt: Expose SYSCONF sound setting #8926

Merged
merged 1 commit into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion Source/Core/Core/Config/SYSCONFSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const Info<u32> SYSCONF_COUNTRY{{System::SYSCONF, "IPL", "SADR"}, 0x6c};
const Info<bool> SYSCONF_WIDESCREEN{{System::SYSCONF, "IPL", "AR"}, true};
const Info<bool> SYSCONF_PROGRESSIVE_SCAN{{System::SYSCONF, "IPL", "PGS"}, true};
const Info<bool> SYSCONF_PAL60{{System::SYSCONF, "IPL", "E60"}, 0x01};
const Info<u32> SYSCONF_SOUND_MODE{{System::SYSCONF, "IPL", "SND"}, 0x01};

// SYSCONF.BT

Expand All @@ -22,13 +23,14 @@ const Info<u32> SYSCONF_SENSOR_BAR_SENSITIVITY{{System::SYSCONF, "BT", "SENS"},
const Info<u32> SYSCONF_SPEAKER_VOLUME{{System::SYSCONF, "BT", "SPKV"}, 0x58};
const Info<bool> SYSCONF_WIIMOTE_MOTOR{{System::SYSCONF, "BT", "MOT"}, true};

const std::array<SYSCONFSetting, 10> SYSCONF_SETTINGS{
const std::array<SYSCONFSetting, 11> SYSCONF_SETTINGS{
{{SYSCONF_SCREENSAVER, SysConf::Entry::Type::Byte},
{SYSCONF_LANGUAGE, SysConf::Entry::Type::Byte},
{SYSCONF_COUNTRY, SysConf::Entry::Type::BigArray},
{SYSCONF_WIDESCREEN, SysConf::Entry::Type::Byte},
{SYSCONF_PROGRESSIVE_SCAN, SysConf::Entry::Type::Byte},
{SYSCONF_PAL60, SysConf::Entry::Type::Byte},
{SYSCONF_SOUND_MODE, SysConf::Entry::Type::Byte},
{SYSCONF_SENSOR_BAR_POSITION, SysConf::Entry::Type::Byte},
{SYSCONF_SENSOR_BAR_SENSITIVITY, SysConf::Entry::Type::Long},
{SYSCONF_SPEAKER_VOLUME, SysConf::Entry::Type::Byte},
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/Core/Config/SYSCONFSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern const Info<u32> SYSCONF_COUNTRY;
extern const Info<bool> SYSCONF_WIDESCREEN;
extern const Info<bool> SYSCONF_PROGRESSIVE_SCAN;
extern const Info<bool> SYSCONF_PAL60;
extern const Info<u32> SYSCONF_SOUND_MODE;

// SYSCONF.BT

Expand All @@ -36,6 +37,6 @@ struct SYSCONFSetting
SysConf::Entry::Type type;
};

extern const std::array<SYSCONFSetting, 10> SYSCONF_SETTINGS;
extern const std::array<SYSCONFSetting, 11> SYSCONF_SETTINGS;

} // namespace Config
15 changes: 15 additions & 0 deletions Source/Core/DolphinQt/Settings/WiiPane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ void WiiPane::ConnectLayout()
&WiiPane::OnSaveConfig);
connect(m_system_language_choice, qOverload<int>(&QComboBox::currentIndexChanged), this,
&WiiPane::OnSaveConfig);
connect(m_sound_mode_choice, qOverload<int>(&QComboBox::currentIndexChanged), this,
&WiiPane::OnSaveConfig);
connect(m_screensaver_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);
connect(m_pal60_mode_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);
connect(m_sd_card_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);
Expand Down Expand Up @@ -109,10 +111,12 @@ void WiiPane::CreateMisc()
m_sd_card_checkbox = new QCheckBox(tr("Insert SD Card"));
m_allow_sd_writes_checkbox = new QCheckBox(tr("Allow Writes to SD Card"));
m_connect_keyboard_checkbox = new QCheckBox(tr("Connect USB Keyboard"));

m_aspect_ratio_choice_label = new QLabel(tr("Aspect Ratio:"));
m_aspect_ratio_choice = new QComboBox();
m_aspect_ratio_choice->addItem(tr("4:3"));
m_aspect_ratio_choice->addItem(tr("16:9"));

m_system_language_choice_label = new QLabel(tr("System Language:"));
m_system_language_choice = new QComboBox();
m_system_language_choice->addItem(tr("Japanese"));
Expand All @@ -126,6 +130,12 @@ void WiiPane::CreateMisc()
m_system_language_choice->addItem(tr("Traditional Chinese"));
m_system_language_choice->addItem(tr("Korean"));

m_sound_mode_choice_label = new QLabel(tr("Sound:"));
m_sound_mode_choice = new QComboBox();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need a tooltip explaining that with HLE there is no difference between Stereo and Surround

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also that this needs to be set to Surround to even enable DPLII in the Audio panel

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't that rather be explained where the DSP HLE and DPLII decoder settings are? This is not the only way to control whether games output surround sound, in particular not for GameCube games, for which this has no effect.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You definitely know better than me. As long as it's somewhere, it's fine. There are a lot of settings in Dolphin and for a new user it isn't easy.

m_sound_mode_choice->addItem(tr("Mono"));
m_sound_mode_choice->addItem(tr("Stereo"));
m_sound_mode_choice->addItem(tr("Surround"));

m_pal60_mode_checkbox->setToolTip(tr("Sets the Wii display mode to 60Hz (480i) instead of 50Hz "
"(576i) for PAL games.\nMay not work for all games."));
m_screensaver_checkbox->setToolTip(tr("Dims the screen after five minutes of inactivity."));
Expand All @@ -142,6 +152,8 @@ void WiiPane::CreateMisc()
misc_settings_group_layout->addWidget(m_aspect_ratio_choice, 3, 1, 1, 1);
misc_settings_group_layout->addWidget(m_system_language_choice_label, 4, 0, 1, 1);
misc_settings_group_layout->addWidget(m_system_language_choice, 4, 1, 1, 1);
misc_settings_group_layout->addWidget(m_sound_mode_choice_label, 5, 0, 1, 1);
misc_settings_group_layout->addWidget(m_sound_mode_choice, 5, 1, 1, 1);
}

void WiiPane::CreateWhitelistedUSBPassthroughDevices()
Expand Down Expand Up @@ -203,6 +215,7 @@ void WiiPane::OnEmulationStateChanged(bool running)
m_pal60_mode_checkbox->setEnabled(!running);
m_system_language_choice->setEnabled(!running);
m_aspect_ratio_choice->setEnabled(!running);
m_sound_mode_choice->setEnabled(!running);
m_wiimote_motor->setEnabled(!running);
m_wiimote_speaker_volume->setEnabled(!running);
m_wiimote_ir_sensitivity->setEnabled(!running);
Expand All @@ -218,6 +231,7 @@ void WiiPane::LoadConfig()
m_connect_keyboard_checkbox->setChecked(Settings::Instance().IsUSBKeyboardConnected());
m_aspect_ratio_choice->setCurrentIndex(Config::Get(Config::SYSCONF_WIDESCREEN));
m_system_language_choice->setCurrentIndex(Config::Get(Config::SYSCONF_LANGUAGE));
m_sound_mode_choice->setCurrentIndex(Config::Get(Config::SYSCONF_SOUND_MODE));

PopulateUSBPassthroughListWidget();

Expand All @@ -244,6 +258,7 @@ void WiiPane::OnSaveConfig()
Config::SetBase<u32>(Config::SYSCONF_SPEAKER_VOLUME, m_wiimote_speaker_volume->value());
Config::SetBase<u32>(Config::SYSCONF_LANGUAGE, m_system_language_choice->currentIndex());
Config::SetBase<bool>(Config::SYSCONF_WIDESCREEN, m_aspect_ratio_choice->currentIndex());
Config::SetBase<u32>(Config::SYSCONF_SOUND_MODE, m_sound_mode_choice->currentIndex());
Config::SetBase(Config::SYSCONF_WIIMOTE_MOTOR, m_wiimote_motor->isChecked());
}

Expand Down
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt/Settings/WiiPane.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class WiiPane : public QWidget
QLabel* m_system_language_choice_label;
QComboBox* m_aspect_ratio_choice;
QLabel* m_aspect_ratio_choice_label;
QComboBox* m_sound_mode_choice;
QLabel* m_sound_mode_choice_label;

// Whitelisted USB Passthrough Devices
QListWidget* m_whitelist_usb_list;
Expand Down