event_queue: Add clear flag to events and don't return error

This commit is contained in:
IndecisiveTurtle 2024-07-17 14:50:26 +03:00
parent c64694c673
commit b6f011c8f6
3 changed files with 8 additions and 4 deletions

View File

@ -346,7 +346,7 @@ s32 PS4_SYSV_ABI sceGnmAddEqEvent(SceKernelEqueue eq, u64 id, void* udata) {
EqueueEvent kernel_event{}; EqueueEvent kernel_event{};
kernel_event.event.ident = id; kernel_event.event.ident = id;
kernel_event.event.filter = SceKernelEvent::Filter::GraphicsCore; kernel_event.event.filter = SceKernelEvent::Filter::GraphicsCore;
kernel_event.event.flags = SceKernelEvent::Flags::Add; kernel_event.event.flags = SceKernelEvent::Flags::Clear;
kernel_event.event.fflags = 0; kernel_event.event.fflags = 0;
kernel_event.event.data = id; kernel_event.event.data = id;
kernel_event.event.udata = udata; kernel_event.event.udata = udata;

View File

@ -94,7 +94,7 @@ int EqueueInternal::GetTriggeredEvents(SceKernelEvent* ev, int num) {
for (auto& event : m_events) { for (auto& event : m_events) {
if (event.IsTriggered()) { if (event.IsTriggered()) {
if (ev->flags & SceKernelEvent::Flags::Clear) { if (event.event.flags & SceKernelEvent::Flags::Clear) {
event.Reset(); event.Reset();
} }

View File

@ -50,13 +50,15 @@ s32 PS4_SYSV_ABI sceVideoOutAddFlipEvent(Kernel::SceKernelEqueue eq, s32 handle,
Kernel::EqueueEvent event{}; Kernel::EqueueEvent event{};
event.event.ident = SCE_VIDEO_OUT_EVENT_FLIP; event.event.ident = SCE_VIDEO_OUT_EVENT_FLIP;
event.event.filter = Kernel::SceKernelEvent::Filter::VideoOut; event.event.filter = Kernel::SceKernelEvent::Filter::VideoOut;
event.event.flags = Kernel::SceKernelEvent::Flags::Clear;
event.event.udata = udata; event.event.udata = udata;
event.event.fflags = 0; event.event.fflags = 0;
event.event.data = 0; event.event.data = 0;
event.data = port; event.data = port;
eq->AddEvent(event);
port->flip_events.push_back(eq); port->flip_events.push_back(eq);
return eq->AddEvent(event); return ORBIS_OK;
} }
s32 PS4_SYSV_ABI sceVideoOutAddVblankEvent(Kernel::SceKernelEqueue eq, s32 handle, void* udata) { s32 PS4_SYSV_ABI sceVideoOutAddVblankEvent(Kernel::SceKernelEqueue eq, s32 handle, void* udata) {
@ -74,13 +76,15 @@ s32 PS4_SYSV_ABI sceVideoOutAddVblankEvent(Kernel::SceKernelEqueue eq, s32 handl
Kernel::EqueueEvent event{}; Kernel::EqueueEvent event{};
event.event.ident = SCE_VIDEO_OUT_EVENT_VBLANK; event.event.ident = SCE_VIDEO_OUT_EVENT_VBLANK;
event.event.filter = Kernel::SceKernelEvent::Filter::VideoOut; event.event.filter = Kernel::SceKernelEvent::Filter::VideoOut;
event.event.flags = Kernel::SceKernelEvent::Flags::Clear;
event.event.udata = udata; event.event.udata = udata;
event.event.fflags = 0; event.event.fflags = 0;
event.event.data = 0; event.event.data = 0;
event.data = port; event.data = port;
eq->AddEvent(event);
port->vblank_events.push_back(eq); port->vblank_events.push_back(eq);
return eq->AddEvent(event); return ORBIS_OK;
} }
s32 PS4_SYSV_ABI sceVideoOutRegisterBuffers(s32 handle, s32 startIndex, void* const* addresses, s32 PS4_SYSV_ABI sceVideoOutRegisterBuffers(s32 handle, s32 startIndex, void* const* addresses,