[Kernel] Added dummy XUserStatsEnumerator

This commit is contained in:
Gliniak 2023-12-19 18:51:26 +01:00
parent a5596332c9
commit 2de1b8ad4b
3 changed files with 21 additions and 3 deletions

View File

@ -752,11 +752,11 @@ dword_result_t XamUserCreateStatsEnumerator_entry(
}
if (buffer_size_ptr) {
*buffer_size_ptr = sizeof(X_STATS_DETAILS) * stats_ptr->stats_amount;
*buffer_size_ptr = 0; // sizeof(X_STATS_DETAILS) * stats_ptr->stats_amount;
}
auto e = object_ref<XStaticUntypedEnumerator>(
new XStaticUntypedEnumerator(kernel_state(), count, flags));
auto e = object_ref<XUserStatsEnumerator>(
new XUserStatsEnumerator(kernel_state(), 0));
const X_STATUS result = e->Initialize(user_index, 0xFB, 0xB0023, 0xB0024, 0);
if (XFAILED(result)) {
return result;

View File

@ -117,5 +117,11 @@ uint32_t XAchievementEnumerator::WriteItems(uint32_t buffer_ptr,
return X_ERROR_SUCCESS;
}
uint32_t XUserStatsEnumerator::WriteItems(uint32_t buffer_ptr,
uint8_t* buffer_data,
uint32_t* written_count) {
return X_ERROR_SUCCESS;
}
} // namespace kernel
} // namespace xe

View File

@ -174,6 +174,18 @@ class XAchievementEnumerator : public XEnumerator {
size_t current_item_ = 0;
};
class XUserStatsEnumerator : public XEnumerator {
public:
XUserStatsEnumerator(KernelState* kernel_state, size_t items_per_enumerate)
: XEnumerator(kernel_state, items_per_enumerate, 0) {}
uint32_t WriteItems(uint32_t buffer_ptr, uint8_t* buffer_data,
uint32_t* written_count) override;
private:
size_t current_item_ = 0;
};
} // namespace kernel
} // namespace xe