mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-31 14:35:19 +00:00
Apply DceData struct to sceVideoOutGetEventCount
Makes the code easier to read
This commit is contained in:
parent
f2cebf7284
commit
737db6fb62
@ -220,7 +220,7 @@ s32 PS4_SYSV_ABI sceVideoOutGetEventData(const Kernel::SceKernelEvent* ev, s64*
|
|||||||
if (ev->ident != static_cast<s32>(OrbisVideoOutInternalEventId::Flip) || ev->data == 0) {
|
if (ev->ident != static_cast<s32>(OrbisVideoOutInternalEventId::Flip) || ev->data == 0) {
|
||||||
*data = event_data;
|
*data = event_data;
|
||||||
} else {
|
} else {
|
||||||
*data = event_data | 0xFFFF000000000000;
|
*data = event_data | 0xffff000000000000;
|
||||||
}
|
}
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
@ -233,7 +233,8 @@ s32 PS4_SYSV_ABI sceVideoOutGetEventCount(const Kernel::SceKernelEvent* ev) {
|
|||||||
return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT;
|
return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (ev->data >> 0xc) & 0xf;
|
auto event_data = static_cast<VideoOutEventData>(ev->data);
|
||||||
|
return event_data.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI sceVideoOutGetFlipStatus(s32 handle, FlipStatus* status) {
|
s32 PS4_SYSV_ABI sceVideoOutGetFlipStatus(s32 handle, FlipStatus* status) {
|
||||||
|
@ -111,6 +111,12 @@ struct SceVideoOutColorSettings {
|
|||||||
u32 reserved[3];
|
u32 reserved[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct VideoOutEventData {
|
||||||
|
u64 time : 12;
|
||||||
|
u64 count : 4;
|
||||||
|
u64 flip_arg : 48;
|
||||||
|
};
|
||||||
|
|
||||||
void PS4_SYSV_ABI sceVideoOutSetBufferAttribute(BufferAttribute* attribute, PixelFormat pixelFormat,
|
void PS4_SYSV_ABI sceVideoOutSetBufferAttribute(BufferAttribute* attribute, PixelFormat pixelFormat,
|
||||||
u32 tilingMode, u32 aspectRatio, u32 width,
|
u32 tilingMode, u32 aspectRatio, u32 width,
|
||||||
u32 height, u32 pitchInPixel);
|
u32 height, u32 pitchInPixel);
|
||||||
|
Loading…
Reference in New Issue
Block a user