diff --git a/src/frontend/qt_sdl/Config.cpp b/src/frontend/qt_sdl/Config.cpp
index b6fca7d6..02f43de7 100644
--- a/src/frontend/qt_sdl/Config.cpp
+++ b/src/frontend/qt_sdl/Config.cpp
@@ -61,6 +61,7 @@ int GL_ScaleFactor;
bool GL_BetterPolygons;
bool LimitFPS;
+int MaxFPS;
bool AudioSync;
bool ShowOSD;
@@ -251,6 +252,7 @@ ConfigEntry ConfigFile[] =
{"GL_BetterPolygons", 1, &GL_BetterPolygons, false, false},
{"LimitFPS", 1, &LimitFPS, true, false},
+ {"MaxFPS", 0, &MaxFPS, 1000, false},
{"AudioSync", 1, &AudioSync, false},
{"ShowOSD", 1, &ShowOSD, true, false},
diff --git a/src/frontend/qt_sdl/Config.h b/src/frontend/qt_sdl/Config.h
index 5e3db823..11644dc2 100644
--- a/src/frontend/qt_sdl/Config.h
+++ b/src/frontend/qt_sdl/Config.h
@@ -105,6 +105,7 @@ extern int GL_ScaleFactor;
extern bool GL_BetterPolygons;
extern bool LimitFPS;
+extern int MaxFPS;
extern bool AudioSync;
extern bool ShowOSD;
diff --git a/src/frontend/qt_sdl/EmuThread.cpp b/src/frontend/qt_sdl/EmuThread.cpp
index 01431a1c..0728a085 100644
--- a/src/frontend/qt_sdl/EmuThread.cpp
+++ b/src/frontend/qt_sdl/EmuThread.cpp
@@ -576,7 +576,7 @@ void EmuThread::run()
{
bool limitfps = Config::LimitFPS && !fastforward;
- double practicalFramelimit = limitfps ? frametimeStep : 1.0 / 1000.0;
+ double practicalFramelimit = limitfps ? frametimeStep : 1.0 / Config::MaxFPS;
double curtime = SDL_GetPerformanceCounter() * perfCountsSec;
diff --git a/src/frontend/qt_sdl/InterfaceSettingsDialog.cpp b/src/frontend/qt_sdl/InterfaceSettingsDialog.cpp
index 2f7417f6..75497bc3 100644
--- a/src/frontend/qt_sdl/InterfaceSettingsDialog.cpp
+++ b/src/frontend/qt_sdl/InterfaceSettingsDialog.cpp
@@ -34,6 +34,7 @@ InterfaceSettingsDialog::InterfaceSettingsDialog(QWidget* parent) : QDialog(pare
ui->spinMouseHideSeconds->setEnabled(Config::MouseHide != 0);
ui->spinMouseHideSeconds->setValue(Config::MouseHideSeconds);
ui->cbPauseLostFocus->setChecked(Config::PauseLostFocus != 0);
+ ui->spinMaxFPS->setValue(Config::MaxFPS);
}
InterfaceSettingsDialog::~InterfaceSettingsDialog()
@@ -60,6 +61,7 @@ void InterfaceSettingsDialog::done(int r)
Config::MouseHide = ui->cbMouseHide->isChecked() ? 1:0;
Config::MouseHideSeconds = ui->spinMouseHideSeconds->value();
Config::PauseLostFocus = ui->cbPauseLostFocus->isChecked() ? 1:0;
+ Config::MaxFPS = ui->spinMaxFPS->value();
Config::Save();
diff --git a/src/frontend/qt_sdl/InterfaceSettingsDialog.ui b/src/frontend/qt_sdl/InterfaceSettingsDialog.ui
index 8ee9feda..01ba4a46 100644
--- a/src/frontend/qt_sdl/InterfaceSettingsDialog.ui
+++ b/src/frontend/qt_sdl/InterfaceSettingsDialog.ui
@@ -6,8 +6,8 @@
0
0
- 262
- 113
+ 337
+ 233
@@ -19,32 +19,96 @@
Interface settings - melonDS
-
- -
-
-
- Hide after
+
+
-
+
+
+ Main window
+
+
-
+
+
+ Hide mouse after inactivity
+
+
+
+ -
+
+
+ 18
+
+
-
+
+
+ After
+
+
+ spinMouseHideSeconds
+
+
+
+ -
+
+
+ -
+
+
+ seconds
+
+
+ spinMouseHideSeconds
+
+
+
+
+
+ -
+
+
+ Pause emulation when window is not in focus
+
+
+
+
- -
-
-
- Pause emulation when window is not in focus
+
-
+
+
+ Framerate
+
+
-
+
+
+ Fast-forward limit
+
+
+ spinMaxFPS
+
+
+
+ -
+
+
+ FPS
+
+
+ 60
+
+
+ 1000
+
+
+ 1000
+
+
+
+
- -
-
-
- Hide mouse after inactivity
-
-
-
- -
-
-
- -
+
-
Qt::Horizontal
@@ -54,20 +118,8 @@
- -
-
-
- seconds of inactivity
-
-
-
-
- cbMouseHide
- spinMouseHideSeconds
- cbPauseLostFocus
-