shadPS4 icon indicating copy to clipboard operation
shadPS4 copied to clipboard

Improved error handling in sceKernelAllocateDirectMemory

Open StevenMiller123 opened this issue 1 month ago • 1 comments

Some games, most notably the Call of Duty series of games, intentionally make sceKernelAllocateDirectMemory calls that fail. To match hardware behavior, we should return ORBIS_KERNEL_ERROR_EAGAIN instead of throwing an assert.

This should fix games that still hit Unable to find free direct memory area asserts after https://github.com/shadps4-emu/shadPS4/pull/1896.

Credits to @red-prig and @raphaelthegreat for helping with the error cases.

This needs testing, as it could hide deeper issues in some games.

StevenMiller123 avatar Jan 03 '25 20:01 StevenMiller123