remove duplicate code in statusbar

Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
swurl 2025-04-23 20:09:59 -04:00
parent 8795b96d46
commit 446e362530

View file

@ -1344,7 +1344,7 @@ void GMainWindow::InitializeHotkeys() {
connect(hotkey, &QShortcut::activated, this, function);
connect(controller_hotkey, &ControllerShortcut::Activated, this, function,
Qt::QueuedConnection);
};
};
connect_shortcut(QStringLiteral("Exit Fullscreen"), [&] {
if (emulation_running && ui->action_Fullscreen->isChecked()) {
@ -1508,7 +1508,7 @@ void GMainWindow::ConnectMenuEvents() {
addAction(action);
// Add actions to the render window so that they work outside of single window mode
render_window->addAction(action);
};
};
// File
connect_menu(ui->action_Load_File, &GMainWindow::OnMenuLoadFile);
@ -4649,13 +4649,9 @@ void GMainWindow::UpdateStatusBar() {
} else {
emu_speed_label->setText(tr("Speed: %1%").arg(results.emulation_speed * 100.0, 0, 'f', 0));
}
if (!Settings::values.use_speed_limit) {
game_fps_label->setText(
tr("Game: %1 FPS (Unlocked)").arg(std::round(results.average_game_fps), 0, 'f', 0));
} else {
game_fps_label->setText(
tr("Game: %1 FPS").arg(std::round(results.average_game_fps), 0, 'f', 0));
}
tr("Game: %1 FPS").arg(std::round(results.average_game_fps), 0, 'f', 0) + tr(Settings::values.use_speed_limit ? " (Unlocked)" : ""));
emu_frametime_label->setText(tr("Frame: %1 ms").arg(results.frametime * 1000.0, 0, 'f', 2));
res_scale_label->setVisible(true);