@@ -3245,13 +3245,11 @@ void CSettings::LoadData()
32453245 DWORD_PTR mask;
32463246 DWORD_PTR sys;
32473247
3248- const auto process = GetCurrentProcess ();
3249- const auto result = GetProcessAffinityMask (process, &mask, &sys);
3248+ HANDLE process = GetCurrentProcess ();
3249+ BOOL result = GetProcessAffinityMask (process, &mask, &sys);
32503250
32513251 if (bVar && result)
3252- {
32533252 SetProcessAffinityMask (process, mask & ~1 );
3254- }
32553253 else
32563254 {
32573255 SYSTEM_INFO info;
@@ -3657,19 +3655,17 @@ void CSettings::SaveData()
36573655 CScreenShot::SetPhotoSavingInsideDocuments (photoSaving);
36583656
36593657 // Process CPU Affinity
3660- const auto affinity = m_pProcessAffinityCheckbox->GetSelected ();
3658+ bool affinity = m_pProcessAffinityCheckbox->GetSelected ();
36613659 CVARS_SET (" process_cpu_affinity" , affinity);
36623660
36633661 DWORD_PTR mask;
36643662 DWORD_PTR sys;
36653663
3666- const auto process = GetCurrentProcess ();
3667- const auto result = GetProcessAffinityMask (process, &mask, &sys);
3664+ HANDLE process = GetCurrentProcess ();
3665+ BOOL result = GetProcessAffinityMask (process, &mask, &sys);
36683666
36693667 if (affinity && result)
3670- {
36713668 SetProcessAffinityMask (process, mask & ~1 );
3672- }
36733669 else
36743670 {
36753671 SYSTEM_INFO info;
@@ -4785,9 +4781,7 @@ bool CSettings::OnAffinityClick(CGUIElement* pElement)
47854781 shownWarning = true ;
47864782
47874783 std::string message = std::string (
4788- _ (" Enabling this setting may improve game performance, but on some processors, it may worsen it.\n "
4789- " We have observed issues with AMD Ryzen processors featuring 3D V-Cache.\n "
4790- " The exact list of affected processors is unknown.\n "
4784+ _ (" This option should only be changed if you experience performance issues.\n "
47914785 " \n Are you sure you want to enable this option?" ));
47924786
47934787 CQuestionBox* pQuestionBox = CCore::GetSingleton ().GetLocalGUI ()->GetMainMenu ()->GetQuestionWindow ();
@@ -4967,7 +4961,7 @@ bool CSettings::OnShowAdvancedSettingDescription(CGUIElement* pElement)
49674961 else if (pCheckBox && pCheckBox == m_pWin8MouseCheckBox)
49684962 strText = std::string (_ (" Mouse fix:" )) + " " + std::string (_ (" Mouse movement fix - May need PC restart" ));
49694963 else if (pCheckBox && pCheckBox == m_pProcessAffinityCheckbox)
4970- strText = std::string (_ (" CPU affinity:" )) + " " + std::string (_ (" Experimental feature - It may improve performance or worsen it. " ));
4964+ strText = std::string (_ (" CPU affinity:" )) + " " + std::string (_ (" Experimental feature - Change only if you experience performance issues " ));
49714965
49724966 if (strText != " " )
49734967 m_pAdvancedSettingDescriptionLabel->SetText (strText.c_str ());
0 commit comments