more completed (but not finished) sceVideoOutAddFlipEvent
This commit is contained in:
parent
3a7563ef64
commit
466cfe96e6
|
@ -81,12 +81,12 @@ s32 PS4_SYSV_ABI sceVideoOutAddFlipEvent(LibKernel::EventQueues::SceKernelEqueue
|
|||
event.event.udata = udata;
|
||||
event.event.fflags = 0;
|
||||
event.event.data = 0;
|
||||
// event.filter.delete_event_func = flip_event_delete_func;//called in sceKernelDeleteEvent
|
||||
// event.filter.reset_event_func = flip_event_reset_func;//called in sceKernelWaitEqueue
|
||||
// event.filter.trigger_event_func = flip_event_trigger_func;//called in sceKernelTriggerEvent
|
||||
// event.filter.delete_event_func = flip_event_delete_func;//called in sceKernelDeleteEvent //TODO
|
||||
// event.filter.reset_event_func = flip_event_reset_func;//called in sceKernelWaitEqueue //TODO
|
||||
// event.filter.trigger_event_func = flip_event_trigger_func;//called in sceKernelTriggerEvent //TODO
|
||||
event.filter.data = ctx;
|
||||
|
||||
int result = 0; // sceKernelAddEvent(eq, event);
|
||||
int result = eq->addEvent(event);
|
||||
|
||||
ctx->m_flip_evtEq.push_back(eq);
|
||||
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
#include "event_queue.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
namespace HLE::Kernel::Objects {
|
||||
EqueueInternal::~EqueueInternal() {}
|
||||
|
||||
int EqueueInternal::addEvent(const EqueueEvent& event) {
|
||||
Lib::LockMutexGuard lock(m_mutex);
|
||||
|
||||
if (m_events.size() > 0) {
|
||||
BREAKPOINT();
|
||||
}
|
||||
// TODO check if event is already exists and return it. Currently we just add in m_events array
|
||||
m_events.push_back(event);
|
||||
|
||||
if (event.isTriggered) {
|
||||
BREAKPOINT(); // we don't support that either yet
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}; // namespace HLE::Kernel::Objects
|
|
@ -1,7 +1,8 @@
|
|||
#pragma once
|
||||
#include <types.h>
|
||||
|
||||
#include <Lib/Threads.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace HLE::Kernel::Objects {
|
||||
|
||||
|
@ -60,12 +61,14 @@ struct EqueueEvent {
|
|||
};
|
||||
|
||||
class EqueueInternal {
|
||||
public:
|
||||
public:
|
||||
EqueueInternal() = default;
|
||||
virtual ~EqueueInternal();
|
||||
void setName(const std::string& m_name) { this->m_name = m_name; }
|
||||
|
||||
int addEvent(const EqueueEvent& event);
|
||||
private:
|
||||
std::string m_name;
|
||||
Lib::Mutex m_mutex;
|
||||
std::vector<EqueueEvent> m_events;
|
||||
};
|
||||
}; // namespace HLE::Kernel::Objects
|
Loading…
Reference in New Issue