From e5ad25c0dc9038912ed8a775169c564a509e270d Mon Sep 17 00:00:00 2001 From: Nayla Hanegan Date: Sat, 9 Nov 2024 21:42:30 -0500 Subject: [PATCH] add codehandler nag --- .../Core/DolphinQt/Settings/GeneralPane.cpp | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index cf34a096aa..54af1d08ba 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -99,8 +99,6 @@ void GeneralPane::ConnectLayout() { connect(m_checkbox_dualcore, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); connect(m_checkbox_cheats, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); - connect(m_combobox_codehandler, QOverload::of(&QComboBox::currentIndexChanged), this, - &GeneralPane::OnCodeHandlerChanged); connect(m_checkbox_override_region_settings, &QCheckBox::stateChanged, this, &GeneralPane::OnSaveConfig); connect(m_checkbox_auto_disc_change, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); @@ -225,13 +223,30 @@ void GeneralPane::CreateCheats() auto* code_handler_layout = new QFormLayout(); auto* code_handler_label = new QLabel(tr("Code Handler:")); m_combobox_codehandler = new QComboBox(); + m_combobox_codehandler->addItem(tr("Dolphin (Stock)"), QVariant(0)); m_combobox_codehandler->addItem(tr("MPN (Extended)"), QVariant(1)); m_combobox_codehandler->addItem(tr("MPN (Super Extended)"), QVariant(2)); - code_handler_layout->addRow(code_handler_label, m_combobox_codehandler); + code_handler_layout->addRow(code_handler_label, m_combobox_codehandler); cheats_group_layout->addLayout(code_handler_layout); + // Add a label to inform users about NetPlay settings + auto* netplay_info_label = new QLabel(tr("Note: All players must have matching code handlers when participating in a NetPlay session.")); + cheats_group_layout->addWidget(netplay_info_label); + + // Add a label to define the different code handlers + auto* code_handler_info_label = new QLabel(tr("Dolphin (Stock): Compatibility with legacy and non Dolphin-MPN builds
(around 3,200 bytes / 400 lines of code.)

" + "MPN (Extended): Improved code handler that has more space with some removed irrevalent functions
(around 3,200 bytes / 440 lines of code.)

" + "MPN (Super Extended): Enhanced code handler that uses hacks to give certain games
currently Mario Party 4, 5, 6 and 8 way more code room
(around 30,000 bytes / 3,750 lines of codes).")); + + code_handler_info_label->setWordWrap(true); + cheats_group_layout->addWidget(code_handler_info_label); + + cheats_group_layout->addSpacing(10); + + connect(m_combobox_codehandler, QOverload::of(&QComboBox::currentIndexChanged), this, &GeneralPane::OnCodeHandlerChanged); + code_handler_layout->setFormAlignment(Qt::AlignLeft | Qt::AlignTop); code_handler_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); } @@ -370,4 +385,4 @@ void GeneralPane::OnCodeHandlerChanged(int index) int code_handler_value = m_combobox_codehandler->itemData(index).toInt(); Config::SetBaseOrCurrent(Config::MAIN_CODE_HANDLER, code_handler_value); Config::Save(); -} +} \ No newline at end of file