summaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp39
1 files changed, 24 insertions, 15 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index f4dd53b9b..7063327e8 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -195,10 +195,10 @@ static void RemoveCachedContents() {
const auto offline_legal_information = cache_dir / "offline_web_applet_legal_information";
const auto offline_system_data = cache_dir / "offline_web_applet_system_data";
- void(Common::FS::RemoveDirRecursively(offline_fonts));
- void(Common::FS::RemoveDirRecursively(offline_manual));
- void(Common::FS::RemoveDirRecursively(offline_legal_information));
- void(Common::FS::RemoveDirRecursively(offline_system_data));
+ Common::FS::RemoveDirRecursively(offline_fonts);
+ Common::FS::RemoveDirRecursively(offline_manual);
+ Common::FS::RemoveDirRecursively(offline_legal_information);
+ Common::FS::RemoveDirRecursively(offline_system_data);
}
GMainWindow::GMainWindow()
@@ -237,7 +237,8 @@ GMainWindow::GMainWindow()
const auto build_id = std::string(Common::g_build_id);
const auto yuzu_build = fmt::format("yuzu Development Build | {}-{}", branch_name, description);
- const auto override_build = fmt::format(std::string(Common::g_title_bar_format_idle), build_id);
+ const auto override_build =
+ fmt::format(fmt::runtime(std::string(Common::g_title_bar_format_idle)), build_id);
const auto yuzu_build_version = override_build.empty() ? yuzu_build : override_build;
LOG_INFO(Frontend, "yuzu Version: {}", yuzu_build_version);
@@ -1026,7 +1027,11 @@ void GMainWindow::InitializeHotkeys() {
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Mute Audio"), this),
&QShortcut::activated, this,
[] { Settings::values.audio_muted = !Settings::values.audio_muted; });
-
+ connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Toggle Framerate Limit"), this),
+ &QShortcut::activated, this, [] {
+ Settings::values.disable_fps_limit.SetValue(
+ !Settings::values.disable_fps_limit.GetValue());
+ });
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Toggle Mouse Panning"), this),
&QShortcut::activated, this, [&] {
Settings::values.mouse_panning = !Settings::values.mouse_panning;
@@ -1418,6 +1423,9 @@ void GMainWindow::BootGame(const QString& filename, std::size_t program_index, S
title_name = Common::FS::PathToUTF8String(
std::filesystem::path{filename.toStdU16String()}.filename());
}
+ const bool is_64bit = system.Kernel().CurrentProcess()->Is64BitProcess();
+ const auto instruction_set_suffix = is_64bit ? " (64-bit)" : " (32-bit)";
+ title_name += instruction_set_suffix;
LOG_INFO(Frontend, "Booting game: {:016X} | {} | {}", title_id, title_name, title_version);
const auto gpu_vendor = system.GPU().Renderer().GetDeviceVendor();
UpdateWindowTitle(title_name, title_version, gpu_vendor);
@@ -1741,8 +1749,8 @@ void GMainWindow::OnGameListRemoveInstalledEntry(u64 program_id, InstalledEntryT
RemoveAddOnContent(program_id, entry_type);
break;
}
- void(Common::FS::RemoveDirRecursively(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) /
- "game_list"));
+ Common::FS::RemoveDirRecursively(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) /
+ "game_list");
game_list->PopulateAsync(UISettings::values.game_dirs);
}
@@ -2211,8 +2219,8 @@ void GMainWindow::OnMenuInstallToNAND() {
: tr("%n file(s) failed to install\n", "", failed_files.size()));
QMessageBox::information(this, tr("Install Results"), install_results);
- void(Common::FS::RemoveDirRecursively(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) /
- "game_list"));
+ Common::FS::RemoveDirRecursively(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) /
+ "game_list");
game_list->PopulateAsync(UISettings::values.game_dirs);
ui.action_Install_File_NAND->setEnabled(true);
}
@@ -2844,7 +2852,7 @@ void GMainWindow::MigrateConfigFiles() {
LOG_INFO(Frontend, "Migrating config file from {} to {}", origin, destination);
if (!Common::FS::RenameFile(origin, destination)) {
// Delete the old config file if one already exists in the new location.
- void(Common::FS::RemoveFile(origin));
+ Common::FS::RemoveFile(origin);
}
}
}
@@ -2856,7 +2864,8 @@ void GMainWindow::UpdateWindowTitle(std::string_view title_name, std::string_vie
const auto build_id = std::string(Common::g_build_id);
const auto yuzu_title = fmt::format("yuzu | {}-{}", branch_name, description);
- const auto override_title = fmt::format(std::string(Common::g_title_bar_format_idle), build_id);
+ const auto override_title =
+ fmt::format(fmt::runtime(std::string(Common::g_title_bar_format_idle)), build_id);
const auto window_title = override_title.empty() ? yuzu_title : override_title;
if (title_name.empty()) {
@@ -3039,9 +3048,9 @@ void GMainWindow::OnReinitializeKeys(ReinitializeKeyBehavior behavior) {
const auto keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir);
- void(Common::FS::RemoveFile(keys_dir / "prod.keys_autogenerated"));
- void(Common::FS::RemoveFile(keys_dir / "console.keys_autogenerated"));
- void(Common::FS::RemoveFile(keys_dir / "title.keys_autogenerated"));
+ Common::FS::RemoveFile(keys_dir / "prod.keys_autogenerated");
+ Common::FS::RemoveFile(keys_dir / "console.keys_autogenerated");
+ Common::FS::RemoveFile(keys_dir / "title.keys_autogenerated");
}
Core::Crypto::KeyManager& keys = Core::Crypto::KeyManager::Instance();