mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
Merge branch 'master' of https://github.com/dolphin-emu/dolphin into dolphin-emu-master
This commit is contained in:
commit
c18016e795
767 changed files with 87644 additions and 70168 deletions
|
@ -190,12 +190,11 @@ void AdvancedPane::CreateLayout()
|
|||
|
||||
void AdvancedPane::ConnectLayout()
|
||||
{
|
||||
connect(m_cpu_emulation_engine_combobox, qOverload<int>(&QComboBox::currentIndexChanged),
|
||||
[](int index) {
|
||||
const auto cpu_cores = PowerPC::AvailableCPUCores();
|
||||
if (index >= 0 && static_cast<size_t>(index) < cpu_cores.size())
|
||||
Config::SetBaseOrCurrent(Config::MAIN_CPU_CORE, cpu_cores[index]);
|
||||
});
|
||||
connect(m_cpu_emulation_engine_combobox, &QComboBox::currentIndexChanged, [](int index) {
|
||||
const auto cpu_cores = PowerPC::AvailableCPUCores();
|
||||
if (index >= 0 && static_cast<size_t>(index) < cpu_cores.size())
|
||||
Config::SetBaseOrCurrent(Config::MAIN_CPU_CORE, cpu_cores[index]);
|
||||
});
|
||||
|
||||
connect(m_cpu_clock_override_checkbox, &QCheckBox::toggled, [this](bool enable_clock_override) {
|
||||
Config::SetBaseOrCurrent(Config::MAIN_OVERCLOCK_ENABLE, enable_clock_override);
|
||||
|
@ -255,7 +254,6 @@ void AdvancedPane::Update()
|
|||
m_cpu_emulation_engine_combobox->setEnabled(!running);
|
||||
m_enable_mmu_checkbox->setEnabled(!running);
|
||||
m_pause_on_panic_checkbox->setEnabled(!running);
|
||||
m_accurate_cpu_cache_checkbox->setEnabled(!running);
|
||||
|
||||
{
|
||||
QFont bf = font();
|
||||
|
|
|
@ -174,13 +174,11 @@ void AudioPane::CreateWidgets()
|
|||
|
||||
void AudioPane::ConnectWidgets()
|
||||
{
|
||||
connect(m_backend_combo, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&AudioPane::SaveSettings);
|
||||
connect(m_backend_combo, &QComboBox::currentIndexChanged, this, &AudioPane::SaveSettings);
|
||||
connect(m_volume_slider, &QSlider::valueChanged, this, &AudioPane::SaveSettings);
|
||||
if (m_latency_control_supported)
|
||||
{
|
||||
connect(m_latency_spin, qOverload<int>(&QSpinBox::valueChanged), this,
|
||||
&AudioPane::SaveSettings);
|
||||
connect(m_latency_spin, &QSpinBox::valueChanged, this, &AudioPane::SaveSettings);
|
||||
}
|
||||
connect(m_stretching_buffer_slider, &QSlider::valueChanged, this, &AudioPane::SaveSettings);
|
||||
connect(m_dolby_pro_logic, &QCheckBox::toggled, this, &AudioPane::SaveSettings);
|
||||
|
@ -191,8 +189,7 @@ void AudioPane::ConnectWidgets()
|
|||
connect(m_dsp_interpreter, &QRadioButton::toggled, this, &AudioPane::SaveSettings);
|
||||
|
||||
#ifdef _WIN32
|
||||
connect(m_wasapi_device_combo, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&AudioPane::SaveSettings);
|
||||
connect(m_wasapi_device_combo, &QComboBox::currentIndexChanged, this, &AudioPane::SaveSettings);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -249,15 +249,14 @@ void GameCubePane::ConnectWidgets()
|
|||
{
|
||||
// IPL Settings
|
||||
connect(m_skip_main_menu, &QCheckBox::stateChanged, this, &GameCubePane::SaveSettings);
|
||||
connect(m_language_combo, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&GameCubePane::SaveSettings);
|
||||
connect(m_language_combo, &QComboBox::currentIndexChanged, this, &GameCubePane::SaveSettings);
|
||||
|
||||
// Device Settings
|
||||
for (ExpansionInterface::Slot slot : ExpansionInterface::SLOTS)
|
||||
{
|
||||
connect(m_slot_combos[slot], qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_slot_combos[slot], &QComboBox::currentIndexChanged, this,
|
||||
[this, slot] { UpdateButton(slot); });
|
||||
connect(m_slot_combos[slot], qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_slot_combos[slot], &QComboBox::currentIndexChanged, this,
|
||||
&GameCubePane::SaveSettings);
|
||||
connect(m_slot_buttons[slot], &QPushButton::clicked, [this, slot] { OnConfigPressed(slot); });
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
|
||||
#include "Core/Config/AchievementSettings.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/Config/UISettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
|
@ -81,7 +82,12 @@ void GeneralPane::OnEmulationStateChanged(Core::State state)
|
|||
const bool running = state != Core::State::Uninitialized;
|
||||
|
||||
m_checkbox_dualcore->setEnabled(!running);
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
bool hardcore = Config::Get(Config::RA_HARDCORE_ENABLED);
|
||||
m_checkbox_cheats->setEnabled(!running && !hardcore);
|
||||
#else // USE_RETRO_ACHIEVEMENTS
|
||||
m_checkbox_cheats->setEnabled(!running);
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
m_checkbox_override_region_settings->setEnabled(!running);
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
m_checkbox_discord_presence->setEnabled(!running);
|
||||
|
@ -101,13 +107,13 @@ void GeneralPane::ConnectLayout()
|
|||
#endif
|
||||
|
||||
// Advanced
|
||||
connect(m_combobox_speedlimit, qOverload<int>(&QComboBox::currentIndexChanged), [this]() {
|
||||
connect(m_combobox_speedlimit, &QComboBox::currentIndexChanged, [this]() {
|
||||
Config::SetBaseOrCurrent(Config::MAIN_EMULATION_SPEED,
|
||||
m_combobox_speedlimit->currentIndex() * 0.1f);
|
||||
Config::Save();
|
||||
});
|
||||
|
||||
connect(m_combobox_fallback_region, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_combobox_fallback_region, &QComboBox::currentIndexChanged, this,
|
||||
&GeneralPane::OnSaveConfig);
|
||||
connect(&Settings::Instance(), &Settings::FallbackRegionChanged, this, &GeneralPane::LoadConfig);
|
||||
|
||||
|
|
|
@ -19,9 +19,11 @@
|
|||
#include "Common/MsgHandler.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
#include "Core/Config/AchievementSettings.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/Config/UISettings.h"
|
||||
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/QtUtils/SignalBlocking.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
@ -84,6 +86,9 @@ InterfacePane::InterfacePane(QWidget* parent) : QWidget(parent)
|
|||
CreateLayout();
|
||||
LoadConfig();
|
||||
ConnectLayout();
|
||||
|
||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
||||
&InterfacePane::LoadConfig);
|
||||
}
|
||||
|
||||
void InterfacePane::CreateLayout()
|
||||
|
@ -133,7 +138,13 @@ void InterfacePane::CreateUI()
|
|||
|
||||
auto userstyle_search_results = Common::DoFileSearch({File::GetUserPath(D_STYLES_IDX)});
|
||||
|
||||
m_combobox_userstyle->addItem(tr("(None)"), QString{});
|
||||
m_combobox_userstyle->addItem(tr("(System)"), static_cast<int>(Settings::StyleType::System));
|
||||
|
||||
// TODO: Support forcing light/dark on other OSes too.
|
||||
#ifdef _WIN32
|
||||
m_combobox_userstyle->addItem(tr("(Light)"), static_cast<int>(Settings::StyleType::Light));
|
||||
m_combobox_userstyle->addItem(tr("(Dark)"), static_cast<int>(Settings::StyleType::Dark));
|
||||
#endif
|
||||
|
||||
for (const std::string& path : userstyle_search_results)
|
||||
{
|
||||
|
@ -143,15 +154,13 @@ void InterfacePane::CreateUI()
|
|||
|
||||
// Checkboxes
|
||||
m_checkbox_use_builtin_title_database = new QCheckBox(tr("Use Built-In Database of Game Names"));
|
||||
m_checkbox_use_userstyle = new QCheckBox(tr("Use Custom User Style"));
|
||||
m_checkbox_use_covers =
|
||||
new QCheckBox(tr("Download Game Covers from GameTDB.com for Use in Grid Mode"));
|
||||
m_checkbox_show_debugging_ui = new QCheckBox(tr("Enable Debugging UI"));
|
||||
m_checkbox_show_debugging_ui = new ToolTipCheckBox(tr("Enable Debugging UI"));
|
||||
m_checkbox_focused_hotkeys = new QCheckBox(tr("Hotkeys Require Window Focus"));
|
||||
m_checkbox_disable_screensaver = new QCheckBox(tr("Inhibit Screensaver During Emulation"));
|
||||
|
||||
groupbox_layout->addWidget(m_checkbox_use_builtin_title_database);
|
||||
groupbox_layout->addWidget(m_checkbox_use_userstyle);
|
||||
groupbox_layout->addWidget(m_checkbox_use_covers);
|
||||
groupbox_layout->addWidget(m_checkbox_show_debugging_ui);
|
||||
groupbox_layout->addWidget(m_checkbox_focused_hotkeys);
|
||||
|
@ -218,13 +227,12 @@ void InterfacePane::ConnectLayout()
|
|||
connect(m_checkbox_disable_screensaver, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||
connect(m_checkbox_show_debugging_ui, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||
connect(m_checkbox_focused_hotkeys, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||
connect(
|
||||
m_combobox_theme, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
[this](int index) { Settings::Instance().SetThemeName(m_combobox_theme->itemText(index)); });
|
||||
connect(m_combobox_userstyle, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&InterfacePane::OnSaveConfig);
|
||||
connect(m_combobox_language, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_combobox_theme, &QComboBox::currentIndexChanged, this, [this](int index) {
|
||||
Settings::Instance().SetThemeName(m_combobox_theme->itemText(index));
|
||||
});
|
||||
connect(m_combobox_userstyle, &QComboBox::currentIndexChanged, this,
|
||||
&InterfacePane::OnSaveConfig);
|
||||
connect(m_combobox_language, &QComboBox::currentIndexChanged, this, &InterfacePane::OnSaveConfig);
|
||||
connect(m_checkbox_top_window, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||
connect(m_checkbox_confirm_on_stop, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||
connect(m_checkbox_use_panic_handlers, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||
|
@ -239,7 +247,6 @@ void InterfacePane::ConnectLayout()
|
|||
&InterfacePane::OnCursorVisibleAlways);
|
||||
connect(m_checkbox_lock_mouse, &QCheckBox::toggled, &Settings::Instance(),
|
||||
&Settings::SetLockCursor);
|
||||
connect(m_checkbox_use_userstyle, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||
}
|
||||
|
||||
void InterfacePane::LoadConfig()
|
||||
|
@ -248,6 +255,21 @@ void InterfacePane::LoadConfig()
|
|||
->setChecked(Config::Get(Config::MAIN_USE_BUILT_IN_TITLE_DATABASE));
|
||||
SignalBlocking(m_checkbox_show_debugging_ui)
|
||||
->setChecked(Settings::Instance().IsDebugModeEnabled());
|
||||
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
bool hardcore = Config::Get(Config::RA_HARDCORE_ENABLED);
|
||||
SignalBlocking(m_checkbox_show_debugging_ui)->setEnabled(!hardcore);
|
||||
if (hardcore)
|
||||
{
|
||||
m_checkbox_show_debugging_ui->SetDescription(
|
||||
tr("<dolphin_emphasis>Disabled in Hardcore Mode.</dolphin_emphasis>"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_checkbox_show_debugging_ui->SetDescription({});
|
||||
}
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
|
||||
SignalBlocking(m_combobox_language)
|
||||
->setCurrentIndex(m_combobox_language->findData(
|
||||
QString::fromStdString(Config::Get(Config::MAIN_INTERFACE_LANGUAGE))));
|
||||
|
@ -255,19 +277,15 @@ void InterfacePane::LoadConfig()
|
|||
->setCurrentIndex(
|
||||
m_combobox_theme->findText(QString::fromStdString(Config::Get(Config::MAIN_THEME_NAME))));
|
||||
|
||||
const QString userstyle = Settings::Instance().GetCurrentUserStyle();
|
||||
const int index = m_combobox_userstyle->findData(QFileInfo(userstyle).fileName());
|
||||
const Settings::StyleType style_type = Settings::Instance().GetStyleType();
|
||||
const QString userstyle = Settings::Instance().GetUserStyleName();
|
||||
const int index = style_type == Settings::StyleType::User ?
|
||||
m_combobox_userstyle->findData(userstyle) :
|
||||
m_combobox_userstyle->findData(static_cast<int>(style_type));
|
||||
|
||||
if (index > 0)
|
||||
SignalBlocking(m_combobox_userstyle)->setCurrentIndex(index);
|
||||
|
||||
SignalBlocking(m_checkbox_use_userstyle)->setChecked(Settings::Instance().AreUserStylesEnabled());
|
||||
|
||||
const bool visible = m_checkbox_use_userstyle->isChecked();
|
||||
|
||||
m_combobox_userstyle->setVisible(visible);
|
||||
m_label_userstyle->setVisible(visible);
|
||||
|
||||
// Render Window Options
|
||||
SignalBlocking(m_checkbox_top_window)
|
||||
->setChecked(Settings::Instance().IsKeepWindowOnTopEnabled());
|
||||
|
@ -298,13 +316,15 @@ void InterfacePane::OnSaveConfig()
|
|||
Config::SetBase(Config::MAIN_USE_BUILT_IN_TITLE_DATABASE,
|
||||
m_checkbox_use_builtin_title_database->isChecked());
|
||||
Settings::Instance().SetDebugModeEnabled(m_checkbox_show_debugging_ui->isChecked());
|
||||
Settings::Instance().SetUserStylesEnabled(m_checkbox_use_userstyle->isChecked());
|
||||
Settings::Instance().SetCurrentUserStyle(m_combobox_userstyle->currentData().toString());
|
||||
|
||||
const bool visible = m_checkbox_use_userstyle->isChecked();
|
||||
|
||||
m_combobox_userstyle->setVisible(visible);
|
||||
m_label_userstyle->setVisible(visible);
|
||||
const auto selected_style = m_combobox_userstyle->currentData();
|
||||
bool is_builtin_type = false;
|
||||
const int style_type_int = selected_style.toInt(&is_builtin_type);
|
||||
Settings::Instance().SetStyleType(is_builtin_type ?
|
||||
static_cast<Settings::StyleType>(style_type_int) :
|
||||
Settings::StyleType::User);
|
||||
if (!is_builtin_type)
|
||||
Settings::Instance().SetUserStyleName(selected_style.toString());
|
||||
Settings::Instance().ApplyStyle();
|
||||
|
||||
// Render Window Options
|
||||
Settings::Instance().SetKeepWindowOnTop(m_checkbox_top_window->isChecked());
|
||||
|
|
|
@ -10,6 +10,7 @@ class QComboBox;
|
|||
class QLabel;
|
||||
class QRadioButton;
|
||||
class QVBoxLayout;
|
||||
class ToolTipCheckBox;
|
||||
|
||||
class InterfacePane final : public QWidget
|
||||
{
|
||||
|
@ -37,7 +38,7 @@ private:
|
|||
QCheckBox* m_checkbox_top_window;
|
||||
QCheckBox* m_checkbox_use_builtin_title_database;
|
||||
QCheckBox* m_checkbox_use_userstyle;
|
||||
QCheckBox* m_checkbox_show_debugging_ui;
|
||||
ToolTipCheckBox* m_checkbox_show_debugging_ui;
|
||||
QCheckBox* m_checkbox_focused_hotkeys;
|
||||
QCheckBox* m_checkbox_use_covers;
|
||||
QCheckBox* m_checkbox_disable_screensaver;
|
||||
|
|
|
@ -109,12 +109,9 @@ void WiiPane::CreateLayout()
|
|||
void WiiPane::ConnectLayout()
|
||||
{
|
||||
// Misc Settings
|
||||
connect(m_aspect_ratio_choice, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&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_aspect_ratio_choice, &QComboBox::currentIndexChanged, this, &WiiPane::OnSaveConfig);
|
||||
connect(m_system_language_choice, &QComboBox::currentIndexChanged, this, &WiiPane::OnSaveConfig);
|
||||
connect(m_sound_mode_choice, &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_connect_keyboard_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);
|
||||
|
@ -128,8 +125,7 @@ void WiiPane::ConnectLayout()
|
|||
connect(m_sd_card_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);
|
||||
connect(m_allow_sd_writes_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);
|
||||
connect(m_sync_sd_folder_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);
|
||||
connect(m_sd_card_size_combo, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&WiiPane::OnSaveConfig);
|
||||
connect(m_sd_card_size_combo, &QComboBox::currentIndexChanged, this, &WiiPane::OnSaveConfig);
|
||||
|
||||
// Whitelisted USB Passthrough Devices
|
||||
connect(m_whitelist_usb_list, &QListWidget::itemClicked, this, &WiiPane::ValidateSelectionState);
|
||||
|
@ -139,7 +135,7 @@ void WiiPane::ConnectLayout()
|
|||
&WiiPane::OnUSBWhitelistRemoveButton);
|
||||
|
||||
// Wii Remote Settings
|
||||
connect(m_wiimote_ir_sensor_position, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_wiimote_ir_sensor_position, &QComboBox::currentIndexChanged, this,
|
||||
&WiiPane::OnSaveConfig);
|
||||
connect(m_wiimote_ir_sensitivity, &QSlider::valueChanged, this, &WiiPane::OnSaveConfig);
|
||||
connect(m_wiimote_speaker_volume, &QSlider::valueChanged, this, &WiiPane::OnSaveConfig);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue