2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

configure_cpu: Simplify UpdateGroup

Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
This commit is contained in:
lat9nq 2021-05-20 01:11:56 -04:00 committed by GitHub
parent 12ef74456c
commit 5153d5387a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,14 +67,11 @@ void ConfigureCpu::AccuracyUpdated(int index) {
}
void ConfigureCpu::UpdateGroup(int index) {
if (Settings::IsConfiguringGlobal()) {
ui->unsafe_group->setVisible(static_cast<Settings::CPUAccuracy>(index) ==
Settings::CPUAccuracy::Unsafe);
} else {
ui->unsafe_group->setVisible(
static_cast<Settings::CPUAccuracy>(index - ConfigurationShared::USE_GLOBAL_OFFSET) ==
Settings::CPUAccuracy::Unsafe);
if (!Settings::IsConfiguringGlobal()) {
index -= ConfigurationShared::USE_GLOBAL_OFFSET;
}
const auto accuracy = static_cast<Settings::CPUAccuracy>(index);
ui->unsafe_group->setVisible(accuracy == Settings::CPUAccuracy::Unsafe);
}
void ConfigureCpu::ApplyConfiguration() {