[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:
parent
716d4c412a
commit
9503c9efaf
|
@ -59,13 +59,8 @@ X_HRESULT XamApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
|
||||||
uint32_t item_count = 0;
|
uint32_t item_count = 0;
|
||||||
auto result = e->WriteItems(data->buffer_ptr, buffer, data->buffer_size,
|
auto result = e->WriteItems(data->buffer_ptr, buffer, data->buffer_size,
|
||||||
&item_count);
|
&item_count);
|
||||||
assert_true(XSUCCEEDED(result));
|
|
||||||
assert_true(item_count <= 1);
|
if (result == X_ERROR_SUCCESS && 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 (data->length_ptr) {
|
if (data->length_ptr) {
|
||||||
auto length_ptr =
|
auto length_ptr =
|
||||||
memory_->TranslateVirtual<be<uint32_t>*>(data->length_ptr);
|
memory_->TranslateVirtual<be<uint32_t>*>(data->length_ptr);
|
||||||
|
|
|
@ -93,6 +93,7 @@ struct XCONTENT_DATA {
|
||||||
static_assert_size(XCONTENT_DATA, 0x134);
|
static_assert_size(XCONTENT_DATA, 0x134);
|
||||||
|
|
||||||
struct XCONTENT_AGGREGATE_DATA : XCONTENT_DATA {
|
struct XCONTENT_AGGREGATE_DATA : XCONTENT_DATA {
|
||||||
|
be<uint64_t> unk134; // some titles store XUID here?
|
||||||
be<uint32_t> title_id;
|
be<uint32_t> title_id;
|
||||||
|
|
||||||
XCONTENT_AGGREGATE_DATA() = default;
|
XCONTENT_AGGREGATE_DATA() = default;
|
||||||
|
@ -102,6 +103,7 @@ struct XCONTENT_AGGREGATE_DATA : XCONTENT_DATA {
|
||||||
set_display_name(other.display_name());
|
set_display_name(other.display_name());
|
||||||
set_file_name(other.file_name());
|
set_file_name(other.file_name());
|
||||||
padding[0] = padding[1] = 0;
|
padding[0] = padding[1] = 0;
|
||||||
|
unk134 = 0;
|
||||||
title_id = kCurrentlyRunningTitleId;
|
title_id = kCurrentlyRunningTitleId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +115,7 @@ struct XCONTENT_AGGREGATE_DATA : XCONTENT_DATA {
|
||||||
file_name() == other.file_name();
|
file_name() == other.file_name();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
static_assert_size(XCONTENT_AGGREGATE_DATA, 0x138);
|
static_assert_size(XCONTENT_AGGREGATE_DATA, 0x148);
|
||||||
|
|
||||||
class ContentPackage {
|
class ContentPackage {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue