From 839e1faf491776f4e2348c46773c248644e260ba Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Sat, 27 Aug 2022 03:31:17 +0200 Subject: yuzu: Display current game version in multiplayer room Makes it easier for users to recognize connection errors caused by different game versions. --- src/core/core.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core') diff --git a/src/core/core.cpp b/src/core/core.cpp index ea32a4a8d..e651ce100 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -319,10 +319,19 @@ struct System::Impl { if (app_loader->ReadTitle(name) != Loader::ResultStatus::Success) { LOG_ERROR(Core, "Failed to read title for ROM (Error {})", load_result); } + + std::string title_version; + const FileSys::PatchManager pm(program_id, system.GetFileSystemController(), + system.GetContentProvider()); + const auto metadata = pm.GetControlMetadata(); + if (metadata.first != nullptr) { + title_version = metadata.first->GetVersionString(); + } if (auto room_member = room_network.GetRoomMember().lock()) { Network::GameInfo game_info; game_info.name = name; game_info.id = program_id; + game_info.version = title_version; room_member->SendGameInfo(game_info); } -- cgit v1.2.3