Skip to content

Commit

Permalink
enhancement: CPU panel had widgets that were not shown as disabled (#…
Browse files Browse the repository at this point in the history
…1326)

The MMU and CPU Data Cache options were not visibly disabled as they should
  • Loading branch information
midwan committed May 19, 2024
1 parent c5e0099 commit 166fed5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/osdep/gui/PanelCPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,9 @@ void RefreshPanelCPU()
optFPU68882->setEnabled(changed_prefs.cpu_model < 68040 && (changed_prefs.cpu_model >= 68020 || !changed_prefs.cpu_compatible));
optFPUinternal->setEnabled(changed_prefs.cpu_model >= 68040);

optMMUEC->setEnabled(changed_prefs.cpu_model >= 68030 && changed_prefs.cachesize == 0);
optMMUEnabled->setEnabled(changed_prefs.cpu_model >= 68030 && changed_prefs.cachesize == 0);

// Set Values
sldCpuSpeed->setValue(static_cast<int>(changed_prefs.m68k_speed_throttle / 100));
auto cpu_speed_info = to_string(static_cast<int>(changed_prefs.m68k_speed_throttle / 10));
Expand All @@ -762,6 +765,7 @@ void RefreshPanelCPU()
chkCPUCompatible->setSelected(changed_prefs.cpu_compatible);
chk24Bit->setSelected(changed_prefs.address_space_24);
chkCpuDataCache->setSelected(changed_prefs.cpu_data_cache);
chkCpuDataCache->setEnabled(changed_prefs.cpu_model >= 68030 && changed_prefs.cachesize == 0 && changed_prefs.cpu_compatible);
chkFPUStrict->setSelected(changed_prefs.fpu_strict);

sldCpuIdle->setValue(changed_prefs.cpu_idle == 0 ? 0 : 12 - changed_prefs.cpu_idle / 15);
Expand Down

0 comments on commit 166fed5

Please sign in to comment.