From db43acc4f91e347f713ad405cc0d02f85c9b8b4e Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Sun, 5 Jul 2026 19:15:49 +0200 Subject: [PATCH] camera: fix regression in low firmware games (#4674) --- src/core/libraries/camera/camera.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/libraries/camera/camera.cpp b/src/core/libraries/camera/camera.cpp index 985f2bb6f..159d233b8 100644 --- a/src/core/libraries/camera/camera.cpp +++ b/src/core/libraries/camera/camera.cpp @@ -461,9 +461,14 @@ s32 PS4_SYSV_ABI sceCameraGetFrameData(s32 handle, OrbisCameraFrameData* frame_d } frame_data->meta.format[0][0] = output_config0.format.formatLevel0; frame_data->meta.format[1][0] = output_config1.format.formatLevel0; - // not fully correct, but good enough - frame_data->pFramePointerListGarlic[0][0] = frame_data->pFramePointerList[0][0]; - frame_data->pFramePointerListGarlic[1][0] = frame_data->pFramePointerList[1][0]; + + // on older firmwares, this wasn't present, and the original library also checks struct size + // instead of the SDK version, and without this check, we'd smash the stack in those games + if (frame_data->sizeThis == 584) { + // not fully correct, but good enough + frame_data->pFramePointerListGarlic[0][0] = frame_data->pFramePointerList[0][0]; + frame_data->pFramePointerListGarlic[1][0] = frame_data->pFramePointerList[1][0]; + } return ORBIS_OK; }