all repos — mgba @ 04c6080f243d97c45b662b9231a5737e23378ff1

mGBA Game Boy Advance Emulator

Qt: FPS target option is now a double
Jeffrey Pfau jeffrey@endrift.com
Sat, 23 May 2015 23:17:31 -0700
commit

04c6080f243d97c45b662b9231a5737e23378ff1

parent

7bc834526a4475607b8a5d998b33cad6877ed6f7

M CHANGESCHANGES

@@ -18,6 +18,7 @@ - Screensaver can now be suspended while a game is running

- Load/save the most recent savestate slot - Support varible speed (PWM) rumble - Ability to cap fast forward speed + - Finer control over FPS target Bugfixes: - ARM7: Fix SWI and IRQ timings - GBA Audio: Force audio FIFOs to 32-bit
M src/platform/qt/SettingsView.cppsrc/platform/qt/SettingsView.cpp

@@ -123,6 +123,10 @@ void SettingsView::saveSetting(const char* key, const QComboBox* field) {

saveSetting(key, field->lineEdit()); } +void SettingsView::saveSetting(const char* key, const QDoubleSpinBox* field) { + saveSetting(key, field->cleanText()); +} + void SettingsView::saveSetting(const char* key, const QLineEdit* field) { saveSetting(key, field->text()); }

@@ -147,6 +151,11 @@ }

void SettingsView::loadSetting(const char* key, QComboBox* field) { loadSetting(key, field->lineEdit()); +} + +void SettingsView::loadSetting(const char* key, QDoubleSpinBox* field) { + QString option = loadSetting(key); + field->setValue(option.toDouble()); } void SettingsView::loadSetting(const char* key, QLineEdit* field) {
M src/platform/qt/SettingsView.hsrc/platform/qt/SettingsView.h

@@ -35,6 +35,7 @@ ConfigController* m_controller;

void saveSetting(const char* key, const QAbstractButton*); void saveSetting(const char* key, const QComboBox*); + void saveSetting(const char* key, const QDoubleSpinBox*); void saveSetting(const char* key, const QLineEdit*); void saveSetting(const char* key, const QSlider*); void saveSetting(const char* key, const QSpinBox*);

@@ -42,6 +43,7 @@ void saveSetting(const char* key, const QString&);

void loadSetting(const char* key, QAbstractButton*); void loadSetting(const char* key, QComboBox*); + void loadSetting(const char* key, QDoubleSpinBox*); void loadSetting(const char* key, QLineEdit*); void loadSetting(const char* key, QSlider*); void loadSetting(const char* key, QSpinBox*);
M src/platform/qt/SettingsView.uisrc/platform/qt/SettingsView.ui

@@ -199,12 +199,15 @@ </item>

<item row="6" column="1"> <layout class="QHBoxLayout" name="horizontalLayout_2"> <item> - <widget class="QSpinBox" name="fpsTarget"> + <widget class="QDoubleSpinBox" name="fpsTarget"> + <property name="minimum"> + <double>0.010000000000000</double> + </property> <property name="maximum"> - <number>240</number> + <double>240.000000000000000</double> </property> <property name="value"> - <number>60</number> + <double>60.000000000000000</double> </property> </widget> </item>