From 12629fe101b7d8c4dec27b6ea3bf21bf0807b9da Mon Sep 17 00:00:00 2001 From: gibbed Date: Mon, 3 Dec 2018 12:07:42 -0600 Subject: [PATCH] [Kernel] Change dummy HDD to 3GB free/4GB total. --- src/xenia/kernel/xam/xam_content.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/xenia/kernel/xam/xam_content.cc b/src/xenia/kernel/xam/xam_content.cc index d9c278cf1..61e4ecdd2 100644 --- a/src/xenia/kernel/xam/xam_content.cc +++ b/src/xenia/kernel/xam/xam_content.cc @@ -25,13 +25,24 @@ struct DeviceInfo { uint64_t free_bytes; 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_ = { - 0xF00D0000, - 1, - 120ull * 1024ull * 1024ull * 1024ull, // 120GB - 100ull * 1024ull * 1024ull * 1024ull, // 100GB, so it looks a little used. + 0xF00D0000, 1, + 4ull * ONE_GB, // 4GB + 3ull * ONE_GB, // 3GB, so it looks a little used. L"Dummy HDD", }; +#undef ONE_GB dword_result_t XamContentGetLicenseMask(lpdword_t mask_ptr, lpunknown_t overlapped_ptr) {