[XAM/User] Only set buffer_size if it's too small

CoD4 calls this with a huge 0x4000 buffer, and then if the buffer_size returned is any smaller it asserts & stops running...
Need to check if this is actually how it should work, but this should help get some CoD4 running
This commit is contained in:
emoose 2020-01-15 00:27:29 +00:00 committed by illusion
parent 1c1025fc4e
commit 91c2811559
1 changed files with 3 additions and 1 deletions

View File

@ -286,7 +286,9 @@ dword_result_t XamUserReadProfileSettings(
}
uint32_t buffer_size = static_cast<uint32_t>(*buffer_size_ptr);
*buffer_size_ptr = size_needed;
if (buffer_size < size_needed) {
*buffer_size_ptr = size_needed;
}
if (!buffer_ptr || buffer_size < size_needed) {
if (overlapped_ptr) {