mirror of
https://github.com/libretro/mgba.git
synced 2024-11-23 16:10:01 +00:00
Qt: Add option to disable FPS display
This commit is contained in:
parent
6d93a3d12b
commit
cda0f95464
1
CHANGES
1
CHANGES
@ -33,6 +33,7 @@ Misc:
|
||||
- Util: Don't build crc32 if the function already exists
|
||||
- GBA: Implement display start DMAs
|
||||
- Qt: Prevent window from being created off-screen
|
||||
- Qt: Add option to disable FPS display
|
||||
|
||||
0.6.1: (2017-10-01)
|
||||
Bugfixes:
|
||||
|
@ -337,6 +337,7 @@ void SettingsView::updateConfig() {
|
||||
saveSetting("libraryStyle", m_ui.libraryStyle->currentIndex());
|
||||
saveSetting("showLibrary", m_ui.showLibrary);
|
||||
saveSetting("preload", m_ui.preload);
|
||||
saveSetting("showFps", m_ui.showFps);
|
||||
|
||||
if (m_ui.fastForwardUnbounded->isChecked()) {
|
||||
saveSetting("fastForwardRatio", "-1");
|
||||
@ -454,6 +455,7 @@ void SettingsView::reloadConfig() {
|
||||
loadSetting("patchPath", m_ui.patchPath);
|
||||
loadSetting("showLibrary", m_ui.showLibrary);
|
||||
loadSetting("preload", m_ui.preload);
|
||||
loadSetting("showFps", m_ui.showFps, true);
|
||||
|
||||
m_ui.libraryStyle->setCurrentIndex(loadSetting("libraryStyle").toInt());
|
||||
|
||||
|
@ -495,6 +495,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QCheckBox" name="showFps">
|
||||
<property name="text">
|
||||
<string>Show FPS in title bar</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="emulation">
|
||||
|
@ -677,7 +677,9 @@ void Window::gameStarted() {
|
||||
#endif
|
||||
|
||||
m_hitUnimplementedBiosCall = false;
|
||||
m_fpsTimer.start();
|
||||
if (m_config->getOption("showFps", "1").toInt()) {
|
||||
m_fpsTimer.start();
|
||||
}
|
||||
m_focusCheck.start();
|
||||
if (m_display->underMouse()) {
|
||||
m_screenWidget->setCursor(Qt::BlankCursor);
|
||||
@ -1585,6 +1587,16 @@ void Window::setupMenu(QMenuBar* menubar) {
|
||||
}, this);
|
||||
m_config->updateOption("preload");
|
||||
|
||||
ConfigOption* showFps = m_config->addOption("showFps");
|
||||
showFps->connect([this](const QVariant& value) {
|
||||
if (!value.toInt()) {
|
||||
m_fpsTimer.stop();
|
||||
updateTitle();
|
||||
} else if (m_controller) {
|
||||
m_fpsTimer.start();
|
||||
}
|
||||
}, this);
|
||||
|
||||
QAction* exitFullScreen = new QAction(tr("Exit fullscreen"), frameMenu);
|
||||
connect(exitFullScreen, &QAction::triggered, this, &Window::exitFullScreen);
|
||||
exitFullScreen->setShortcut(QKeySequence("Esc"));
|
||||
|
Loading…
Reference in New Issue
Block a user