mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-31 14:35:19 +00:00
add some validations
This commit is contained in:
parent
cec89a3c48
commit
27b7bc72e1
@ -152,10 +152,23 @@ s32 PS4_SYSV_ABI sceVideoOutSubmitFlip(s32 handle, s32 bufferIndex, s32 flipMode
|
|||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceVideoOutGetEventId(const Kernel::SceKernelEvent* ev) {
|
int PS4_SYSV_ABI sceVideoOutGetEventId(const Kernel::SceKernelEvent* ev) {
|
||||||
|
if (ev == nullptr) {
|
||||||
|
return SCE_VIDEO_OUT_ERROR_INVALID_ADDRESS;
|
||||||
|
}
|
||||||
|
if (ev->filter != Kernel::SceKernelEvent::Filter::VideoOut) {
|
||||||
|
return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT_QUEUE;
|
||||||
|
}
|
||||||
return ev->ident;
|
return ev->ident;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceVideoOutGetEventData(const Kernel::SceKernelEvent* ev, int64_t* data) {
|
int PS4_SYSV_ABI sceVideoOutGetEventData(const Kernel::SceKernelEvent* ev, int64_t* data) {
|
||||||
|
if (ev == nullptr || data == nullptr) {
|
||||||
|
return SCE_VIDEO_OUT_ERROR_INVALID_ADDRESS;
|
||||||
|
}
|
||||||
|
if (ev->filter != Kernel::SceKernelEvent::Filter::VideoOut) {
|
||||||
|
return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT_QUEUE;
|
||||||
|
}
|
||||||
|
|
||||||
*data = ev->data;
|
*data = ev->data;
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user