@@ -4765,34 +4765,39 @@ static void CPUAffinityQuestionCallBack(void* userdata, unsigned int button)
4765
4765
{
4766
4766
CCore::GetSingleton ().GetLocalGUI ()->GetMainMenu ()->GetQuestionWindow ()->Reset ();
4767
4767
4768
- if (button == 0 )
4769
- {
4770
- auto const checkBox = reinterpret_cast <CGUICheckBox*>(userdata);
4771
- checkBox->SetSelected (false );
4772
- }
4768
+ auto * checkbox = static_cast <CGUICheckBox*>(userdata);
4769
+
4770
+ if (!checkbox)
4771
+ return ;
4772
+
4773
+ if (button != 0 )
4774
+ return ;
4775
+
4776
+ checkbox->SetSelected (true );
4773
4777
}
4774
4778
4775
4779
bool CSettings::OnAffinityClick (CGUIElement* pElement)
4776
4780
{
4777
- static bool shownWarning = false ;
4781
+ static bool shown = false ;
4778
4782
4779
- if (m_pProcessAffinityCheckbox->GetSelected () && !shownWarning)
4780
- {
4781
- shownWarning = true ;
4783
+ if (m_pProcessAffinityCheckbox->GetSelected () || shown)
4784
+ return true ;
4782
4785
4783
- std::string message = std::string (
4784
- _ (" This option should only be changed if you experience performance issues.\n "
4785
- " \n Are you sure you want to enable this option?" ));
4786
+ shown = true ;
4786
4787
4787
- CQuestionBox* pQuestionBox = CCore::GetSingleton ().GetLocalGUI ()->GetMainMenu ()->GetQuestionWindow ();
4788
- pQuestionBox->Reset ();
4789
- pQuestionBox->SetTitle (_ (" EXPERIMENTAL FEATURE" ));
4790
- pQuestionBox->SetMessage (message);
4791
- pQuestionBox->SetButton (0 , _ (" No" ));
4792
- pQuestionBox->SetButton (1 , _ (" Yes" ));
4793
- pQuestionBox->SetCallback (CPUAffinityQuestionCallBack, m_pProcessAffinityCheckbox);
4794
- pQuestionBox->Show ();
4795
- }
4788
+ std::string title = _ (" EXPERIMENTAL FEATURE" );
4789
+ std::string message =
4790
+ std::string (_ (" Disabling this option is not recommended unless you are experiencing performance issues.\n\n "
4791
+ " Are you sure you want to disable it?" ));
4792
+
4793
+ CQuestionBox* pQuestionBox = CCore::GetSingleton ().GetLocalGUI ()->GetMainMenu ()->GetQuestionWindow ();
4794
+ pQuestionBox->Reset ();
4795
+ pQuestionBox->SetTitle (title);
4796
+ pQuestionBox->SetMessage (message);
4797
+ pQuestionBox->SetButton (0 , _ (" No" ));
4798
+ pQuestionBox->SetButton (1 , _ (" Yes" ));
4799
+ pQuestionBox->SetCallback (CPUAffinityQuestionCallBack, m_pProcessAffinityCheckbox);
4800
+ pQuestionBox->Show ();
4796
4801
4797
4802
return true ;
4798
4803
}
@@ -4961,7 +4966,7 @@ bool CSettings::OnShowAdvancedSettingDescription(CGUIElement* pElement)
4961
4966
else if (pCheckBox && pCheckBox == m_pWin8MouseCheckBox)
4962
4967
strText = std::string (_ (" Mouse fix:" )) + " " + std::string (_ (" Mouse movement fix - May need PC restart" ));
4963
4968
else if (pCheckBox && pCheckBox == m_pProcessAffinityCheckbox)
4964
- strText = std::string (_ (" CPU affinity:" )) + " " + std::string (_ (" Experimental feature - Change only if you experience performance issues" ));
4969
+ strText = std::string (_ (" CPU affinity:" )) + " " + std::string (_ (" Only disable if you're having performance issues. " ));
4965
4970
4966
4971
if (strText != " " )
4967
4972
m_pAdvancedSettingDescriptionLabel->SetText (strText.c_str ());
0 commit comments