Qt: Customizable autofire speed (closes #789)

This commit is contained in:
Vicki Pfau 2017-08-03 22:43:15 -07:00
parent 7bd29d6e44
commit 1733c64561
3 changed files with 40 additions and 20 deletions

View File

@ -5,6 +5,7 @@ Features:
- Qt: Set default Game Boy colors - Qt: Set default Game Boy colors
- Game Boy Printer support - Game Boy Printer support
- Super Game Boy support - Super Game Boy support
- Customizable autofire speed
Bugfixes: Bugfixes:
- GB Audio: Make audio unsigned with bias (fixes mgba.io/i/749) - GB Audio: Make audio unsigned with bias (fixes mgba.io/i/749)
- Python: Fix importing .gb or .gba before .core - Python: Fix importing .gb or .gba before .core

View File

@ -288,6 +288,7 @@ void SettingsView::updateConfig() {
saveSetting("audioSync", m_ui.audioSync); saveSetting("audioSync", m_ui.audioSync);
saveSetting("frameskip", m_ui.frameskip); saveSetting("frameskip", m_ui.frameskip);
saveSetting("fpsTarget", m_ui.fpsTarget); saveSetting("fpsTarget", m_ui.fpsTarget);
saveSetting("autofireThreshold", m_ui.autofireThreshold);
saveSetting("lockAspectRatio", m_ui.lockAspectRatio); saveSetting("lockAspectRatio", m_ui.lockAspectRatio);
saveSetting("lockIntegerScaling", m_ui.lockIntegerScaling); saveSetting("lockIntegerScaling", m_ui.lockIntegerScaling);
saveSetting("volume", m_ui.volume); saveSetting("volume", m_ui.volume);
@ -391,6 +392,7 @@ void SettingsView::reloadConfig() {
loadSetting("audioSync", m_ui.audioSync); loadSetting("audioSync", m_ui.audioSync);
loadSetting("frameskip", m_ui.frameskip); loadSetting("frameskip", m_ui.frameskip);
loadSetting("fpsTarget", m_ui.fpsTarget); loadSetting("fpsTarget", m_ui.fpsTarget);
loadSetting("autofireThreshold", m_ui.autofireThreshold);
loadSetting("lockAspectRatio", m_ui.lockAspectRatio); loadSetting("lockAspectRatio", m_ui.lockAspectRatio);
loadSetting("lockIntegerScaling", m_ui.lockIntegerScaling); loadSetting("lockIntegerScaling", m_ui.lockIntegerScaling);
loadSetting("volume", m_ui.volume); loadSetting("volume", m_ui.volume);

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>650</width> <width>650</width>
<height>454</height> <height>488</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -545,28 +545,28 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0" colspan="2"> <item row="2" column="0" colspan="2">
<widget class="Line" name="line"> <widget class="Line" name="line">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="3" column="1">
<widget class="QCheckBox" name="rewind"> <widget class="QCheckBox" name="rewind">
<property name="text"> <property name="text">
<string>Enable rewind</string> <string>Enable rewind</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="4" column="0">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="text"> <property name="text">
<string>Rewind history:</string> <string>Rewind history:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="4" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_13"> <layout class="QHBoxLayout" name="horizontalLayout_13">
<item> <item>
<widget class="QSpinBox" name="rewindCapacity"> <widget class="QSpinBox" name="rewindCapacity">
@ -584,21 +584,21 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="5" column="0" colspan="2"> <item row="6" column="0" colspan="2">
<widget class="Line" name="line_3"> <widget class="Line" name="line_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0"> <item row="7" column="0">
<widget class="QLabel" name="label_15"> <widget class="QLabel" name="label_15">
<property name="text"> <property name="text">
<string>Idle loops:</string> <string>Idle loops:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="1"> <item row="7" column="1">
<widget class="QComboBox" name="idleOptimization"> <widget class="QComboBox" name="idleOptimization">
<item> <item>
<property name="text"> <property name="text">
@ -617,21 +617,21 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="8" column="0" colspan="2"> <item row="9" column="0" colspan="2">
<widget class="Line" name="line_2"> <widget class="Line" name="line_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="0"> <item row="10" column="0">
<widget class="QLabel" name="label_24"> <widget class="QLabel" name="label_24">
<property name="text"> <property name="text">
<string>Savestate extra data:</string> <string>Savestate extra data:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="1"> <item row="10" column="1">
<widget class="QCheckBox" name="saveStateScreenshot"> <widget class="QCheckBox" name="saveStateScreenshot">
<property name="text"> <property name="text">
<string>Screenshot</string> <string>Screenshot</string>
@ -641,7 +641,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="1"> <item row="11" column="1">
<widget class="QCheckBox" name="saveStateSave"> <widget class="QCheckBox" name="saveStateSave">
<property name="text"> <property name="text">
<string>Save data</string> <string>Save data</string>
@ -651,7 +651,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="1"> <item row="12" column="1">
<widget class="QCheckBox" name="saveStateCheats"> <widget class="QCheckBox" name="saveStateCheats">
<property name="text"> <property name="text">
<string>Cheat codes</string> <string>Cheat codes</string>
@ -661,14 +661,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="13" column="0"> <item row="14" column="0">
<widget class="QLabel" name="label_25"> <widget class="QLabel" name="label_25">
<property name="text"> <property name="text">
<string>Load extra data:</string> <string>Load extra data:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="13" column="1"> <item row="14" column="1">
<widget class="QCheckBox" name="loadStateScreenshot"> <widget class="QCheckBox" name="loadStateScreenshot">
<property name="text"> <property name="text">
<string>Screenshot</string> <string>Screenshot</string>
@ -678,28 +678,28 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="14" column="1"> <item row="15" column="1">
<widget class="QCheckBox" name="loadStateSave"> <widget class="QCheckBox" name="loadStateSave">
<property name="text"> <property name="text">
<string>Save data</string> <string>Save data</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="15" column="1"> <item row="16" column="1">
<widget class="QCheckBox" name="loadStateCheats"> <widget class="QCheckBox" name="loadStateCheats">
<property name="text"> <property name="text">
<string>Cheat codes</string> <string>Cheat codes</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="0" colspan="2"> <item row="13" column="0" colspan="2">
<widget class="Line" name="line_9"> <widget class="Line" name="line_9">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="5" column="1">
<widget class="QCheckBox" name="rewindSave"> <widget class="QCheckBox" name="rewindSave">
<property name="text"> <property name="text">
<string>Rewind affects save data</string> <string>Rewind affects save data</string>
@ -709,13 +709,30 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="8" column="1">
<widget class="QCheckBox" name="preload"> <widget class="QCheckBox" name="preload">
<property name="text"> <property name="text">
<string>Preload entire ROM into memory</string> <string>Preload entire ROM into memory</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QLabel" name="label_31">
<property name="text">
<string>Autofire interval:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="autofireThreshold">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>60</number>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="bios"> <widget class="QWidget" name="bios">