diff options
| author | 2022-08-27 03:31:17 +0200 | |
|---|---|---|
| committer | 2022-08-27 03:31:17 +0200 | |
| commit | 839e1faf491776f4e2348c46773c248644e260ba (patch) | |
| tree | dab0425ff7e8f6817d0c363c59107adb39785ef2 /src/core/core.cpp | |
| parent | network: Use lower timeout for enet_host_service (diff) | |
| download | yuzu-839e1faf491776f4e2348c46773c248644e260ba.tar.gz yuzu-839e1faf491776f4e2348c46773c248644e260ba.tar.xz yuzu-839e1faf491776f4e2348c46773c248644e260ba.zip | |
yuzu: Display current game version in multiplayer room
Makes it easier for users to recognize connection errors caused by different game versions.
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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 { | |||
| 319 | if (app_loader->ReadTitle(name) != Loader::ResultStatus::Success) { | 319 | if (app_loader->ReadTitle(name) != Loader::ResultStatus::Success) { |
| 320 | LOG_ERROR(Core, "Failed to read title for ROM (Error {})", load_result); | 320 | LOG_ERROR(Core, "Failed to read title for ROM (Error {})", load_result); |
| 321 | } | 321 | } |
| 322 | |||
| 323 | std::string title_version; | ||
| 324 | const FileSys::PatchManager pm(program_id, system.GetFileSystemController(), | ||
| 325 | system.GetContentProvider()); | ||
| 326 | const auto metadata = pm.GetControlMetadata(); | ||
| 327 | if (metadata.first != nullptr) { | ||
| 328 | title_version = metadata.first->GetVersionString(); | ||
| 329 | } | ||
| 322 | if (auto room_member = room_network.GetRoomMember().lock()) { | 330 | if (auto room_member = room_network.GetRoomMember().lock()) { |
| 323 | Network::GameInfo game_info; | 331 | Network::GameInfo game_info; |
| 324 | game_info.name = name; | 332 | game_info.name = name; |
| 325 | game_info.id = program_id; | 333 | game_info.id = program_id; |
| 334 | game_info.version = title_version; | ||
| 326 | room_member->SendGameInfo(game_info); | 335 | room_member->SendGameInfo(game_info); |
| 327 | } | 336 | } |
| 328 | 337 | ||