mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-26 20:36:16 +00:00
Fix VideoOut events (#2330)
* Fix event data for VideoOut events Fix is based on some decompilation work shared by red_prig. * Cleanup * Oops * Style fixes * Clang * Fix libSceVideoOut event idents Based on some decompilation work, events coming from libSceVideoOut use a separate set of values for identifiers. These values are only converted to OrbisVideoOutEventId values during calls to sceVideoOutGetEventId. For convenience, I've placed all relevant identifiers into a enum called OrbisVideoOutInternalEventId. Thanks to @red_prig for the tips. * Fix? Seems like `static_cast<u32>(hint) & 0xFF == event.ident` here, and doing those right shifts on the event.ident winds up breaking stuff. Without this change, the if always fails because event_id was getting set to 0 instead. * Clang
This commit is contained in:
parent
02ad2b78fa
commit
8ad650582a
5 changed files with 69 additions and 10 deletions
|
@ -84,7 +84,11 @@ bool EqueueInternal::TriggerEvent(u64 ident, s16 filter, void* trigger_data) {
|
|||
std::scoped_lock lock{m_mutex};
|
||||
for (auto& event : m_events) {
|
||||
if (event.event.ident == ident && event.event.filter == filter) {
|
||||
event.Trigger(trigger_data);
|
||||
if (filter == SceKernelEvent::Filter::VideoOut) {
|
||||
event.TriggerDisplay(trigger_data);
|
||||
} else {
|
||||
event.Trigger(trigger_data);
|
||||
}
|
||||
has_found = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue