fixing @georgemoralis code
This commit is contained in:
parent
b634d512d3
commit
3a7563ef64
|
@ -12,7 +12,7 @@ struct VideoConfigInternal {
|
|||
bool isOpened = false;
|
||||
SceVideoOutFlipStatus m_flip_status;
|
||||
SceVideoOutVblankStatus m_vblank_status;
|
||||
std::vector<HLE::Libs::LibKernel::EventQueues::SceKernelEqueue> flip_evtEq;
|
||||
std::vector<HLE::Libs::LibKernel::EventQueues::SceKernelEqueue> m_flip_evtEq;
|
||||
};
|
||||
|
||||
class VideoOutCtx {
|
||||
|
|
|
@ -65,11 +65,10 @@ s32 PS4_SYSV_ABI sceVideoOutAddFlipEvent(LibKernel::EventQueues::SceKernelEqueue
|
|||
|
||||
auto* ctx = videoOut->getCtx(handle);
|
||||
|
||||
if (ctx == nullptr)
|
||||
{
|
||||
if (ctx == nullptr) {
|
||||
return SCE_VIDEO_OUT_ERROR_INVALID_HANDLE;
|
||||
}
|
||||
ctx->m_mutex.LockMutex();
|
||||
Lib::LockMutexGuard lock(ctx->m_mutex);
|
||||
|
||||
if (eq == nullptr) {
|
||||
return SCE_VIDEO_OUT_ERROR_INVALID_EVENT_QUEUE;
|
||||
|
@ -89,9 +88,7 @@ s32 PS4_SYSV_ABI sceVideoOutAddFlipEvent(LibKernel::EventQueues::SceKernelEqueue
|
|||
|
||||
int result = 0; // sceKernelAddEvent(eq, event);
|
||||
|
||||
ctx->flip_evtEq.push_back(eq);
|
||||
|
||||
ctx->m_mutex.UnlockMutex();
|
||||
ctx->m_flip_evtEq.push_back(eq);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -35,10 +35,7 @@ constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_NONE = 0;
|
|||
constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_VR = 7;
|
||||
constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_STRICT_COLORIMETRY = 8;
|
||||
|
||||
//SceVideoOutEventId
|
||||
constexpr int SCE_VIDEO_OUT_EVENT_FLIP = 0;
|
||||
constexpr int SCE_VIDEO_OUT_EVENT_VBLANK = 1;
|
||||
constexpr int SCE_VIDEO_OUT_EVENT_PRE_VBLANK_START = 2;
|
||||
enum SceVideoOutEventId : s16 { SCE_VIDEO_OUT_EVENT_FLIP = 0, SCE_VIDEO_OUT_EVENT_VBLANK = 1, SCE_VIDEO_OUT_EVENT_PRE_VBLANK_START = 2 };
|
||||
|
||||
enum SceVideoOutTilingMode : s32 { SCE_VIDEO_OUT_TILING_MODE_TILE = 0, SCE_VIDEO_OUT_TILING_MODE_LINEAR = 1 };
|
||||
|
||||
|
|
|
@ -33,9 +33,9 @@ struct EqueueEvent;
|
|||
|
||||
using SceKernelEqueue = Kernel::Objects::EqueueInternal*;
|
||||
|
||||
using trigger_func_ptr = void (*)(EqueueEvent* event, void* trigger_data);
|
||||
using reset_func_ptr = void (*)(EqueueEvent* event);
|
||||
using delete_func_ptr = void (*)(SceKernelEqueue eq, EqueueEvent* event);
|
||||
using TriggerFunc = void (*)(EqueueEvent* event, void* trigger_data);
|
||||
using ResetFunc = void (*)(EqueueEvent* event);
|
||||
using DeleteFunc = void (*)(SceKernelEqueue eq, EqueueEvent* event);
|
||||
|
||||
struct Event {
|
||||
u64 ident = 0; /* identifier for this event */
|
||||
|
@ -48,9 +48,9 @@ struct Event {
|
|||
|
||||
struct Filter {
|
||||
void* data = nullptr;
|
||||
trigger_func_ptr trigger_event_func = nullptr;
|
||||
reset_func_ptr reset__event_func = nullptr;
|
||||
delete_func_ptr delete_event_func = nullptr;
|
||||
TriggerFunc trigger_event_func = nullptr;
|
||||
ResetFunc reset__event_func = nullptr;
|
||||
DeleteFunc delete_event_func = nullptr;
|
||||
};
|
||||
|
||||
struct EqueueEvent {
|
||||
|
|
Loading…
Reference in New Issue