From 04c6080f243d97c45b662b9231a5737e23378ff1 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 23 May 2015 23:17:31 -0700 Subject: [PATCH] Qt: FPS target option is now a double --- CHANGES | 1 + src/platform/qt/SettingsView.cpp | 9 +++++++++ src/platform/qt/SettingsView.h | 2 ++ src/platform/qt/SettingsView.ui | 9 ++++++--- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index b0f650478..4f376d20b 100644 --- a/CHANGES +++ b/CHANGES @@ -18,6 +18,7 @@ Features: - 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 diff --git a/src/platform/qt/SettingsView.cpp b/src/platform/qt/SettingsView.cpp index e18e4a686..4eb9b11d1 100644 --- a/src/platform/qt/SettingsView.cpp +++ b/src/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()); } @@ -149,6 +153,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) { QString option = loadSetting(key); field->setText(option); diff --git a/src/platform/qt/SettingsView.h b/src/platform/qt/SettingsView.h index 0b0d4f211..bf480272e 100644 --- a/src/platform/qt/SettingsView.h +++ b/src/platform/qt/SettingsView.h @@ -35,6 +35,7 @@ private: 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 @@ private: 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*); diff --git a/src/platform/qt/SettingsView.ui b/src/platform/qt/SettingsView.ui index 3d9b1d22f..2d451460f 100644 --- a/src/platform/qt/SettingsView.ui +++ b/src/platform/qt/SettingsView.ui @@ -199,12 +199,15 @@ - + + + 0.010000000000000 + - 240 + 240.000000000000000 - 60 + 60.000000000000000