[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:
parent
1c1025fc4e
commit
91c2811559
|
@ -286,7 +286,9 @@ dword_result_t XamUserReadProfileSettings(
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t buffer_size = static_cast<uint32_t>(*buffer_size_ptr);
|
uint32_t buffer_size = static_cast<uint32_t>(*buffer_size_ptr);
|
||||||
|
if (buffer_size < size_needed) {
|
||||||
*buffer_size_ptr = size_needed;
|
*buffer_size_ptr = size_needed;
|
||||||
|
}
|
||||||
|
|
||||||
if (!buffer_ptr || buffer_size < size_needed) {
|
if (!buffer_ptr || buffer_size < size_needed) {
|
||||||
if (overlapped_ptr) {
|
if (overlapped_ptr) {
|
||||||
|
|
Loading…
Reference in New Issue