[App] Add Compatibility help menu item.

This commit is contained in:
gibbed 2022-01-29 03:33:09 -06:00 committed by Rick Gibbed
parent c6b2b1e8eb
commit 306ee85514
2 changed files with 19 additions and 0 deletions

View File

@ -589,6 +589,10 @@ bool EmulatorWindow::Initialize() {
MenuItem::Create(MenuItem::Type::kString, "FA&Q...", "F1",
std::bind(&EmulatorWindow::ShowFAQ, this)));
help_menu->AddChild(MenuItem::Create(MenuItem::Type::kSeparator));
help_menu->AddChild(
MenuItem::Create(MenuItem::Type::kString, "Game &compatibility...",
std::bind(&EmulatorWindow::ShowCompatibility, this)));
help_menu->AddChild(MenuItem::Create(MenuItem::Type::kSeparator));
help_menu->AddChild(MenuItem::Create(
MenuItem::Type::kString, "Build commit on GitHub...", "F2",
std::bind(&EmulatorWindow::ShowBuildCommit, this)));
@ -928,6 +932,20 @@ void EmulatorWindow::ToggleDisplayConfigDialog() {
}
}
void EmulatorWindow::ShowCompatibility() {
const std::string_view base_url =
"https://github.com/xenia-project/game-compatibility/issues";
std::string url;
// Avoid searching for a title ID of "00000000".
uint32_t title_id = emulator_->title_id();
if (!title_id) {
url = base_url;
} else {
url = fmt::format("{}?q=is%3Aissue+is%3Aopen+{:08X}", base_url, title_id);
}
LaunchWebBrowser(url);
}
void EmulatorWindow::ShowFAQ() {
LaunchWebBrowser("https://github.com/xenia-project/xenia/wiki/FAQ");
}

View File

@ -139,6 +139,7 @@ class EmulatorWindow {
void GpuTraceFrame();
void GpuClearCaches();
void ToggleDisplayConfigDialog();
void ShowCompatibility();
void ShowFAQ();
void ShowBuildCommit();