[Kernel] Move title_id field in XCONTENT_AGGREGATE_DATA struct

XamAppEnumerateContentAggregate seems to store title_id at 0x140, so I've moved title_id to there, now AGGREGATE_DATA seems to match the size of the struct used by XamContentCreateInternal.

Also removed unneeded/useless checks inside XamAppEnumerateContentAggregate.
This commit is contained in:
emoose
2021-06-15 22:33:45 +01:00
committed by Rick Gibbed
parent 716d4c412a
commit 9503c9efaf
2 changed files with 5 additions and 8 deletions

View File

@@ -59,13 +59,8 @@ X_HRESULT XamApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
uint32_t item_count = 0;
auto result = e->WriteItems(data->buffer_ptr, buffer, data->buffer_size,
&item_count);
assert_true(XSUCCEEDED(result));
assert_true(item_count <= 1);
if (XSUCCEEDED(result) && item_count == 1) {
auto content_data = reinterpret_cast<XCONTENT_AGGREGATE_DATA*>(buffer);
// TODO(gibbed): WTF?
*reinterpret_cast<be<uint32_t>*>(&buffer[0x140]) =
content_data->title_id;
if (result == X_ERROR_SUCCESS && item_count >= 1) {
if (data->length_ptr) {
auto length_ptr =
memory_->TranslateVirtual<be<uint32_t>*>(data->length_ptr);