From 7bacb78ce31a5bdef46ffd8e863b2a4b696e08a4 Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Sun, 7 Jan 2024 09:38:41 -0800 Subject: [PATCH] boss: Add some missing property IDs and fix file enumeration. (#7322) --- src/core/hle/service/boss/online_service.cpp | 7 +++++-- src/core/hle/service/boss/online_service.h | 21 +++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/core/hle/service/boss/online_service.cpp b/src/core/hle/service/boss/online_service.cpp index 8e3ab7c56..2ae967e47 100644 --- a/src/core/hle/service/boss/online_service.cpp +++ b/src/core/hle/service/boss/online_service.cpp @@ -229,9 +229,10 @@ std::vector OnlineService::GetBossExtDataFiles( do { boss_files.resize(boss_files.size() + files_to_read); entry_count = dir->Read(files_to_read, boss_files.data() + (i++ * files_to_read)); - } while (files_to_read <= entry_count); + } while (entry_count > files_to_read); - boss_files.resize(i * files_to_read + entry_count); + // Resize to trim off unused entries from the final read. + boss_files.resize((i - 1) * files_to_read + entry_count); return boss_files; } @@ -485,6 +486,7 @@ Result OnlineService::SendProperty(const u16 id, const u32 size, Kernel::MappedB std::visit(overload{[&](u8& cur_prop) { read_pod(cur_prop); }, [&](u16& cur_prop) { read_pod(cur_prop); }, [&](u32& cur_prop) { read_pod(cur_prop); }, + [&](u64& cur_prop) { read_pod(cur_prop); }, [&](std::vector& cur_prop) { read_vector(cur_prop); }, [&](std::vector& cur_prop) { read_vector(cur_prop); }}, prop); @@ -521,6 +523,7 @@ Result OnlineService::ReceiveProperty(const u16 id, const u32 size, Kernel::Mapp std::visit(overload{[&](u8& cur_prop) { write_pod(cur_prop); }, [&](u16& cur_prop) { write_pod(cur_prop); }, [&](u32& cur_prop) { write_pod(cur_prop); }, + [&](u64& cur_prop) { write_pod(cur_prop); }, [&](std::vector& cur_prop) { write_vector(cur_prop); }, [&](std::vector& cur_prop) { write_vector(cur_prop); }}, prop); diff --git a/src/core/hle/service/boss/online_service.h b/src/core/hle/service/boss/online_service.h index 6d20bc1e5..a80fceede 100644 --- a/src/core/hle/service/boss/online_service.h +++ b/src/core/hle/service/boss/online_service.h @@ -113,7 +113,7 @@ struct BossSSData { std::array url; }; -using BossTaskProperty = std::variant, std::vector>; +using BossTaskProperty = std::variant, std::vector>; struct BossTaskProperties { bool task_result; std::map properties{ @@ -145,6 +145,25 @@ struct BossTaskProperties { {static_cast(0x1A), u8()}, {static_cast(0x1B), u32()}, {static_cast(0x1C), u32()}, + {static_cast(0x1D), u8()}, + {static_cast(0x1E), u8()}, + {static_cast(0x1F), u8()}, + {static_cast(0x20), u8()}, + {static_cast(0x21), u8()}, + {static_cast(0x22), u8()}, + {static_cast(0x23), u32()}, + {static_cast(0x24), u8()}, + {static_cast(0x25), u32()}, + {static_cast(0x26), u32()}, + {static_cast(0x27), u32()}, + {static_cast(0x28), u64()}, + {static_cast(0x29), u64()}, + {static_cast(0x2A), u32()}, + {static_cast(0x2B), u32()}, + {static_cast(0x2C), u8()}, + {static_cast(0x2D), u16()}, + {static_cast(0x2E), u16()}, + {static_cast(0x2F), std::vector(0x40)}, {PropertyID::TotalTasks, u16()}, {PropertyID::TaskIdList, std::vector(TASKIDLIST_SIZE)}, {static_cast(0x3B), u32()},