fixing @georgemoralis code

This commit is contained in:
wheremyfoodat 2023-09-05 14:01:47 +03:00 committed by georgemoralis
parent b634d512d3
commit 3a7563ef64
4 changed files with 12 additions and 18 deletions

View File

@ -12,7 +12,7 @@ struct VideoConfigInternal {
bool isOpened = false; bool isOpened = false;
SceVideoOutFlipStatus m_flip_status; SceVideoOutFlipStatus m_flip_status;
SceVideoOutVblankStatus m_vblank_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 { class VideoOutCtx {

View File

@ -65,11 +65,10 @@ s32 PS4_SYSV_ABI sceVideoOutAddFlipEvent(LibKernel::EventQueues::SceKernelEqueue
auto* ctx = videoOut->getCtx(handle); auto* ctx = videoOut->getCtx(handle);
if (ctx == nullptr) if (ctx == nullptr) {
{
return SCE_VIDEO_OUT_ERROR_INVALID_HANDLE; return SCE_VIDEO_OUT_ERROR_INVALID_HANDLE;
} }
ctx->m_mutex.LockMutex(); Lib::LockMutexGuard lock(ctx->m_mutex);
if (eq == nullptr) { if (eq == nullptr) {
return SCE_VIDEO_OUT_ERROR_INVALID_EVENT_QUEUE; 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); int result = 0; // sceKernelAddEvent(eq, event);
ctx->flip_evtEq.push_back(eq); ctx->m_flip_evtEq.push_back(eq);
ctx->m_mutex.UnlockMutex();
return result; return result;
} }

View File

@ -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_VR = 7;
constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_STRICT_COLORIMETRY = 8; constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_STRICT_COLORIMETRY = 8;
//SceVideoOutEventId enum SceVideoOutEventId : s16 { SCE_VIDEO_OUT_EVENT_FLIP = 0, SCE_VIDEO_OUT_EVENT_VBLANK = 1, SCE_VIDEO_OUT_EVENT_PRE_VBLANK_START = 2 };
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 SceVideoOutTilingMode : s32 { SCE_VIDEO_OUT_TILING_MODE_TILE = 0, SCE_VIDEO_OUT_TILING_MODE_LINEAR = 1 }; enum SceVideoOutTilingMode : s32 { SCE_VIDEO_OUT_TILING_MODE_TILE = 0, SCE_VIDEO_OUT_TILING_MODE_LINEAR = 1 };

View File

@ -33,9 +33,9 @@ struct EqueueEvent;
using SceKernelEqueue = Kernel::Objects::EqueueInternal*; using SceKernelEqueue = Kernel::Objects::EqueueInternal*;
using trigger_func_ptr = void (*)(EqueueEvent* event, void* trigger_data); using TriggerFunc = void (*)(EqueueEvent* event, void* trigger_data);
using reset_func_ptr = void (*)(EqueueEvent* event); using ResetFunc = void (*)(EqueueEvent* event);
using delete_func_ptr = void (*)(SceKernelEqueue eq, EqueueEvent* event); using DeleteFunc = void (*)(SceKernelEqueue eq, EqueueEvent* event);
struct Event { struct Event {
u64 ident = 0; /* identifier for this event */ u64 ident = 0; /* identifier for this event */
@ -48,9 +48,9 @@ struct Event {
struct Filter { struct Filter {
void* data = nullptr; void* data = nullptr;
trigger_func_ptr trigger_event_func = nullptr; TriggerFunc trigger_event_func = nullptr;
reset_func_ptr reset__event_func = nullptr; ResetFunc reset__event_func = nullptr;
delete_func_ptr delete_event_func = nullptr; DeleteFunc delete_event_func = nullptr;
}; };
struct EqueueEvent { struct EqueueEvent {