[XAM] Raise the size of the dummy HDD to 20GB.
- [XAM] Raise the size of the dummy HDD to 20GB. - [XAM] Rename unknown field to device_type in X_CONTENT_DEVICE_DATA.
This commit is contained in:
parent
ce1a31faad
commit
94b9616b3a
|
@ -46,14 +46,12 @@ struct DeviceInfo {
|
||||||
// they incorrectly only look at the lower 32-bits of free_bytes,
|
// they incorrectly only look at the lower 32-bits of free_bytes,
|
||||||
// when it is a 64-bit value. Which means any size above ~4GB
|
// when it is a 64-bit value. Which means any size above ~4GB
|
||||||
// will not be recognized properly.
|
// will not be recognized properly.
|
||||||
//
|
|
||||||
// NOTE(randprint): you can use 120 GB and 42 GB 'fullness'
|
|
||||||
// with the proper deviceID feel free to change at your discression
|
|
||||||
#define ONE_GB (1024ull * 1024ull * 1024ull)
|
#define ONE_GB (1024ull * 1024ull * 1024ull)
|
||||||
static const DeviceInfo dummy_device_info_ = {
|
static const DeviceInfo dummy_device_info_ = {
|
||||||
0x00000001, 1, // found from debugging / reversing UE3 engine titles
|
0x00000001, // id
|
||||||
4ull * ONE_GB, // 4GB
|
1, // 1=HDD
|
||||||
3ull * ONE_GB, // 3GB, so it looks a little used.
|
20ull * ONE_GB, // 20GB
|
||||||
|
3ull * ONE_GB, // 3GB, so it looks a little used.
|
||||||
u"Dummy HDD",
|
u"Dummy HDD",
|
||||||
};
|
};
|
||||||
#undef ONE_GB
|
#undef ONE_GB
|
||||||
|
@ -118,7 +116,7 @@ DECLARE_XAM_EXPORT1(XamContentGetDeviceState, kContent, kStub);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
xe::be<uint32_t> device_id;
|
xe::be<uint32_t> device_id;
|
||||||
xe::be<uint32_t> unknown;
|
xe::be<uint32_t> device_type;
|
||||||
xe::be<uint64_t> total_bytes;
|
xe::be<uint64_t> total_bytes;
|
||||||
xe::be<uint64_t> free_bytes;
|
xe::be<uint64_t> free_bytes;
|
||||||
xe::be<uint16_t> name[28];
|
xe::be<uint16_t> name[28];
|
||||||
|
@ -135,7 +133,7 @@ dword_result_t XamContentGetDeviceData(
|
||||||
device_data.Zero();
|
device_data.Zero();
|
||||||
const auto& device_info = dummy_device_info_;
|
const auto& device_info = dummy_device_info_;
|
||||||
device_data->device_id = device_info.device_id;
|
device_data->device_id = device_info.device_id;
|
||||||
device_data->unknown = device_id & 0xFFFF; // Fake it.
|
device_data->device_type = device_info.device_type;
|
||||||
device_data->total_bytes = device_info.total_bytes;
|
device_data->total_bytes = device_info.total_bytes;
|
||||||
device_data->free_bytes = device_info.free_bytes;
|
device_data->free_bytes = device_info.free_bytes;
|
||||||
xe::store_and_swap<std::u16string>(&device_data->name[0], device_info.name);
|
xe::store_and_swap<std::u16string>(&device_data->name[0], device_info.name);
|
||||||
|
|
Loading…
Reference in New Issue