mirror of https://github.com/mgba-emu/mgba.git
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
|
- Util: Don't build crc32 if the function already exists
|
||||||
- GBA: Implement display start DMAs
|
- GBA: Implement display start DMAs
|
||||||
- Qt: Prevent window from being created off-screen
|
- Qt: Prevent window from being created off-screen
|
||||||
|
- Qt: Add option to disable FPS display
|
||||||
|
|
||||||
0.6.1: (2017-10-01)
|
0.6.1: (2017-10-01)
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
|
|
@ -337,6 +337,7 @@ void SettingsView::updateConfig() {
|
||||||
saveSetting("libraryStyle", m_ui.libraryStyle->currentIndex());
|
saveSetting("libraryStyle", m_ui.libraryStyle->currentIndex());
|
||||||
saveSetting("showLibrary", m_ui.showLibrary);
|
saveSetting("showLibrary", m_ui.showLibrary);
|
||||||
saveSetting("preload", m_ui.preload);
|
saveSetting("preload", m_ui.preload);
|
||||||
|
saveSetting("showFps", m_ui.showFps);
|
||||||
|
|
||||||
if (m_ui.fastForwardUnbounded->isChecked()) {
|
if (m_ui.fastForwardUnbounded->isChecked()) {
|
||||||
saveSetting("fastForwardRatio", "-1");
|
saveSetting("fastForwardRatio", "-1");
|
||||||
|
@ -454,6 +455,7 @@ void SettingsView::reloadConfig() {
|
||||||
loadSetting("patchPath", m_ui.patchPath);
|
loadSetting("patchPath", m_ui.patchPath);
|
||||||
loadSetting("showLibrary", m_ui.showLibrary);
|
loadSetting("showLibrary", m_ui.showLibrary);
|
||||||
loadSetting("preload", m_ui.preload);
|
loadSetting("preload", m_ui.preload);
|
||||||
|
loadSetting("showFps", m_ui.showFps, true);
|
||||||
|
|
||||||
m_ui.libraryStyle->setCurrentIndex(loadSetting("libraryStyle").toInt());
|
m_ui.libraryStyle->setCurrentIndex(loadSetting("libraryStyle").toInt());
|
||||||
|
|
||||||
|
|
|
@ -495,6 +495,16 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="emulation">
|
<widget class="QWidget" name="emulation">
|
||||||
|
|
|
@ -677,7 +677,9 @@ void Window::gameStarted() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_hitUnimplementedBiosCall = false;
|
m_hitUnimplementedBiosCall = false;
|
||||||
m_fpsTimer.start();
|
if (m_config->getOption("showFps", "1").toInt()) {
|
||||||
|
m_fpsTimer.start();
|
||||||
|
}
|
||||||
m_focusCheck.start();
|
m_focusCheck.start();
|
||||||
if (m_display->underMouse()) {
|
if (m_display->underMouse()) {
|
||||||
m_screenWidget->setCursor(Qt::BlankCursor);
|
m_screenWidget->setCursor(Qt::BlankCursor);
|
||||||
|
@ -1585,6 +1587,16 @@ void Window::setupMenu(QMenuBar* menubar) {
|
||||||
}, this);
|
}, this);
|
||||||
m_config->updateOption("preload");
|
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);
|
QAction* exitFullScreen = new QAction(tr("Exit fullscreen"), frameMenu);
|
||||||
connect(exitFullScreen, &QAction::triggered, this, &Window::exitFullScreen);
|
connect(exitFullScreen, &QAction::triggered, this, &Window::exitFullScreen);
|
||||||
exitFullScreen->setShortcut(QKeySequence("Esc"));
|
exitFullScreen->setShortcut(QKeySequence("Esc"));
|
||||||
|
|
Loading…
Reference in New Issue