mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 05:15:46 -04:00
GameSettings: Make DMA/GPU tweak settings overridable
This commit is contained in:
@ -287,6 +287,27 @@ void GamePropertiesDialog::populateGameSettings()
|
||||
m_ui.displayActiveEndOffset->setValue(static_cast<int>(gs.display_active_end_offset.value()));
|
||||
}
|
||||
|
||||
if (gs.dma_max_slice_ticks.has_value())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.dmaMaxSliceTicks);
|
||||
m_ui.dmaMaxSliceTicks->setValue(static_cast<int>(gs.dma_max_slice_ticks.value()));
|
||||
}
|
||||
if (gs.dma_halt_ticks.has_value())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.dmaHaltTicks);
|
||||
m_ui.dmaHaltTicks->setValue(static_cast<int>(gs.dma_halt_ticks.value()));
|
||||
}
|
||||
if (gs.gpu_fifo_size.has_value())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.gpuFIFOSize);
|
||||
m_ui.gpuFIFOSize->setValue(static_cast<int>(gs.gpu_fifo_size.value()));
|
||||
}
|
||||
if (gs.gpu_max_run_ahead.has_value())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.gpuMaxRunAhead);
|
||||
m_ui.gpuMaxRunAhead->setValue(static_cast<int>(gs.gpu_max_run_ahead.value()));
|
||||
}
|
||||
|
||||
if (gs.display_crop_mode.has_value())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.userCropMode);
|
||||
@ -584,6 +605,34 @@ void GamePropertiesDialog::connectUi()
|
||||
m_game_settings.display_active_end_offset = static_cast<s16>(value);
|
||||
saveGameSettings();
|
||||
});
|
||||
connect(m_ui.dmaMaxSliceTicks, QOverload<int>::of(&QSpinBox::valueChanged), [this](int value) {
|
||||
if (value == 0)
|
||||
m_game_settings.dma_max_slice_ticks.reset();
|
||||
else
|
||||
m_game_settings.dma_max_slice_ticks = static_cast<u32>(value);
|
||||
saveGameSettings();
|
||||
});
|
||||
connect(m_ui.dmaHaltTicks, QOverload<int>::of(&QSpinBox::valueChanged), [this](int value) {
|
||||
if (value == 0)
|
||||
m_game_settings.dma_halt_ticks.reset();
|
||||
else
|
||||
m_game_settings.dma_halt_ticks = static_cast<u32>(value);
|
||||
saveGameSettings();
|
||||
});
|
||||
connect(m_ui.gpuFIFOSize, QOverload<int>::of(&QSpinBox::valueChanged), [this](int value) {
|
||||
if (value == 0)
|
||||
m_game_settings.gpu_fifo_size.reset();
|
||||
else
|
||||
m_game_settings.gpu_fifo_size = static_cast<u32>(value);
|
||||
saveGameSettings();
|
||||
});
|
||||
connect(m_ui.gpuMaxRunAhead, QOverload<int>::of(&QSpinBox::valueChanged), [this](int value) {
|
||||
if (value == 0)
|
||||
m_game_settings.gpu_max_run_ahead.reset();
|
||||
else
|
||||
m_game_settings.gpu_max_run_ahead = static_cast<u32>(value);
|
||||
saveGameSettings();
|
||||
});
|
||||
}
|
||||
|
||||
void GamePropertiesDialog::updateCPUClockSpeedLabel()
|
||||
|
@ -676,6 +676,71 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>DMA Max Slice Ticks:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="dmaMaxSliceTicks">
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>DMA Halt Ticks:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="dmaHaltTicks">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="text">
|
||||
<string>GPU FIFO Size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="gpuFIFOSize">
|
||||
<property name="maximum">
|
||||
<number>128</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_27">
|
||||
<property name="text">
|
||||
<string>GPU Max Run Ahead:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="gpuMaxRunAhead">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>16</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
Reference in New Issue
Block a user