[Kernel] Change dummy HDD to 3GB free/4GB total.

This commit is contained in:
gibbed 2018-12-03 12:07:42 -06:00
parent 9dc46eee85
commit 12629fe101
1 changed files with 15 additions and 4 deletions

View File

@ -25,13 +25,24 @@ struct DeviceInfo {
uint64_t free_bytes; uint64_t free_bytes;
wchar_t name[28]; wchar_t name[28];
}; };
// TODO(gibbed): real information.
//
// Until we expose real information about a HDD device, we
// claim there is 3GB free on a 4GB dummy HDD.
//
// There is a possibility that certain games are bugged in that
// 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
// will not be recognized properly.
#define ONE_GB (1024ull * 1024ull * 1024ull)
static const DeviceInfo dummy_device_info_ = { static const DeviceInfo dummy_device_info_ = {
0xF00D0000, 0xF00D0000, 1,
1, 4ull * ONE_GB, // 4GB
120ull * 1024ull * 1024ull * 1024ull, // 120GB 3ull * ONE_GB, // 3GB, so it looks a little used.
100ull * 1024ull * 1024ull * 1024ull, // 100GB, so it looks a little used.
L"Dummy HDD", L"Dummy HDD",
}; };
#undef ONE_GB
dword_result_t XamContentGetLicenseMask(lpdword_t mask_ptr, dword_result_t XamContentGetLicenseMask(lpdword_t mask_ptr,
lpunknown_t overlapped_ptr) { lpunknown_t overlapped_ptr) {