File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -259,22 +259,24 @@ void radeon_profile::on_btn_removeOcProfile_clicked()
259259}
260260
261261void radeon_profile::setCurrentOcProfile (const QString &name) {
262+ const auto &ocp = ocProfiles.value (name);
263+
262264 if (tableHasBeenModified) {
263265 if (static_cast <ForcePowerLevels>(ui->combo_pLevel ->currentIndex ()) != ForcePowerLevels::F_MANUAL)
264266 device.setForcePowerLevel (ForcePowerLevels::F_MANUAL);
265267
266268 if (device.getDriverFeatures ().isVDDCCurveAvailable )
267- device.setOcTable (" vc" , ocProfiles. value (name) .tables .value (OD_VDDC_CURVE));
269+ device.setOcTable (" vc" , ocp .tables .value (OD_VDDC_CURVE));
268270 else {
269- device.setOcTable (" s" , ocProfiles. value (name) .tables .value (OD_SCLK));
270- device.setOcTable (" m" , ocProfiles. value (name) .tables .value (OD_MCLK));
271+ device.setOcTable (" s" , ocp .tables .value (OD_SCLK));
272+ device.setOcTable (" m" , ocp .tables .value (OD_MCLK));
271273 }
272274
273275 device.sendOcTableCommand (" c" );
274276 }
275277
276- if (device.getDriverFeatures ().isPowerCapAvailable && device. gpuData [ValueID::POWER_CAP_CURRENT]. value != ui-> slider_powerCap -> value () )
277- device.setPowerCap (ui-> slider_powerCap -> value () );
278+ if (device.getDriverFeatures ().isPowerCapAvailable )
279+ device.setPowerCap (ocp. powerCap );
278280
279281 ui->l_currentOcProfile ->setText (name);
280282 ui->btn_ocProfileControl ->menu ()->actions ()[findCurrentMenuIndex (ui->btn_ocProfileControl ->menu (), name)]->setChecked (true );
You can’t perform that action at this time.
0 commit comments