mirror of
https://github.com/ong19th/Citron.git
synced 2025-12-12 07:37:00 +00:00
feat: add CPU clock rate slider to settings
Implement a slider in the CPU settings tab to adjust the BASE_CLOCK_RATE up to 1,785 MHz (Switch's official maximum clock rate). Default remains at 1,020 MHz. This change: - Adds UI slider and spinbox to configure_cpu.ui with range 500-1785 MHz - Makes BASE_CLOCK_RATE dynamic by reading from settings - Modifies WallClock to handle dynamic clock rate changes - Updates APM controller to properly set the clock rate - Changes clock rate settings category from Core to CPU The user can now easily adjust the CPU clock rate to improve performance or manage thermals and power consumption. Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
parent
bbd3253169
commit
278486d059
6 changed files with 116 additions and 10 deletions
|
|
@ -126,6 +126,67 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="clock_rate_group">
|
||||
<property name="title">
|
||||
<string>CPU Clock Rate</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_clock_description">
|
||||
<property name="text">
|
||||
<string>CPU clock rate in MHz. Setting a higher clock rate will improve performance but may cause system instability. Default is 1020 MHz.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<widget class="QSlider" name="clock_rate_slider">
|
||||
<property name="minimum">
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1785</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1020</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="clock_rate_spinbox">
|
||||
<property name="suffix">
|
||||
<string> MHz</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1785</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1020</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue