mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-29 11:06:07 +00:00
video_out: added display buffer labels
This commit is contained in:
parent
4206ec3c94
commit
50bcd13482
|
@ -19,6 +19,8 @@ struct VideoOutPort {
|
|||
bool is_open = false;
|
||||
SceVideoOutResolutionStatus resolution;
|
||||
std::array<VideoOutBuffer, MaxDisplayBuffers> buffer_slots;
|
||||
std::array<uintptr_t, MaxDisplayBuffers> buffer_labels; // should be contiguous in memory
|
||||
static_assert(sizeof(buffer_labels[0]) == 8u);
|
||||
std::array<BufferAttributeGroup, MaxDisplayBufferGroups> groups;
|
||||
FlipStatus flip_status;
|
||||
SceVideoOutVblankStatus vblank_status;
|
||||
|
|
|
@ -210,6 +210,12 @@ void Vblank() {
|
|||
return driver->Vblank();
|
||||
}
|
||||
|
||||
void sceVideoOutGetBufferLabelAddress(s32 handle, uintptr_t* label_addr) {
|
||||
auto* port = driver->GetPort(handle);
|
||||
ASSERT(port);
|
||||
*label_addr = reinterpret_cast<uintptr_t>(port->buffer_labels.data());
|
||||
}
|
||||
|
||||
void RegisterLib(Core::Loader::SymbolsResolver* sym) {
|
||||
driver = std::make_unique<VideoOutDriver>(Config::getScreenWidth(), Config::getScreenHeight());
|
||||
|
||||
|
|
|
@ -102,6 +102,8 @@ s32 PS4_SYSV_ABI sceVideoOutClose(s32 handle);
|
|||
void Flip(std::chrono::microseconds micros);
|
||||
void Vblank();
|
||||
|
||||
void sceVideoOutGetBufferLabelAddress(s32 handle, uintptr_t* label_addr);
|
||||
|
||||
void RegisterLib(Core::Loader::SymbolsResolver* sym);
|
||||
|
||||
} // namespace Libraries::VideoOut
|
||||
|
|
Loading…
Reference in a new issue