mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
run timercallback after addEvent and remove useless code
This commit is contained in:
parent
e0f3ac0c43
commit
75b92ae18b
@ -364,17 +364,16 @@ int PS4_SYSV_ABI sceKernelAddTimerEvent(SceKernelEqueue eq, int id, SceKernelUse
|
||||
io_context, std::chrono::milliseconds(interval_ms));
|
||||
|
||||
KernelSignalRequest();
|
||||
std::thread([]() { io_context.run(); }).detach();
|
||||
|
||||
if (!eq->AddEvent(event)) {
|
||||
return ORBIS_KERNEL_ERROR_ENOMEM;
|
||||
}
|
||||
|
||||
timer->async_wait(
|
||||
[eq, event_data = event.event, interval_ms, timer](const boost::system::error_code& ec) {
|
||||
TimerCallback(ec, eq, event_data, interval_ms);
|
||||
});
|
||||
|
||||
if (!eq->AddEvent(event)) {
|
||||
return ORBIS_KERNEL_ERROR_ENOMEM;
|
||||
}
|
||||
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user