mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-09 10:10:01 +01:00
dce: stub getVBlankStatus
This commit is contained in:
parent
fed5cfac53
commit
23fd83e3d5
|
|
@ -311,7 +311,7 @@ void Device::start() {
|
|||
});
|
||||
}
|
||||
|
||||
std::jthread vblankThread([](const std::stop_token &stopToken) {
|
||||
std::jthread vblankThread([this](const std::stop_token &stopToken) {
|
||||
orbis::g_context->deviceEventEmitter->emit(
|
||||
orbis::kEvFiltDisplay,
|
||||
[=](orbis::KNote *note) -> std::optional<orbis::intptr_t> {
|
||||
|
|
@ -330,6 +330,8 @@ void Device::start() {
|
|||
std::chrono::duration_cast<std::chrono::nanoseconds>(period);
|
||||
std::this_thread::sleep_until(prevVBlank);
|
||||
|
||||
vblankCount++;
|
||||
|
||||
orbis::g_context->deviceEventEmitter->emit(
|
||||
orbis::kEvFiltDisplay,
|
||||
[=](orbis::KNote *note) -> std::optional<orbis::intptr_t> {
|
||||
|
|
|
|||
|
|
@ -469,6 +469,22 @@ static orbis::ErrorCode dce_ioctl(orbis::File *file, std::uint64_t request,
|
|||
return {};
|
||||
});
|
||||
|
||||
} else if (args->id == 0xb) {
|
||||
struct VblankStatus {
|
||||
orbis::uint64_t count;
|
||||
orbis::uint64_t processTime;
|
||||
orbis::uint64_t tsc;
|
||||
char flags;
|
||||
};
|
||||
|
||||
VblankStatus vblankStatus{};
|
||||
// TODO: lock bridge header
|
||||
vblankStatus.count = gpuCtx.vblankCount;
|
||||
vblankStatus.processTime = 0; // TODO
|
||||
vblankStatus.tsc = 0; // TODO
|
||||
vblankStatus.flags = 0; // TODO
|
||||
|
||||
std::memcpy(args->ptr, &vblankStatus, sizeof(VblankStatus));
|
||||
} else { // used during open/close
|
||||
ORBIS_LOG_NOTICE("dce: UNIMPLEMENTED FlipControl", args->id, args->arg2,
|
||||
args->ptr, args->size);
|
||||
|
|
|
|||
Loading…
Reference in a new issue