Skip to content

Commit

Permalink
Fix Dx12 HL_XBS frame event
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed May 6, 2024
1 parent d70ec99 commit e8f74ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/directx/dx12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ void register_frame_events() {
// May return S_OK, S_FALSE
HRESULT hr = drv->device->SetFrameIntervalX(dxgiOutput, D3D12XBOX_FRAME_INTERVAL_60_HZ, drv->swapBufferCount - 1u /* Allow n-1 frames of latency */, D3D12XBOX_FRAME_INTERVAL_FLAG_NONE);
if (hr < 0) ReportDxError(hr, __LINE__);
CHKERR(drv->device->ScheduleFrameEventX(D3D12XBOX_FRAME_EVENT_ORIGIN, 0U, nullptr, D3D12XBOX_SCHEDULE_FRAME_EVENT_FLAG_NONE));
// May return 0x10000000 on XBOXONE
hr = drv->device->ScheduleFrameEventX(D3D12XBOX_FRAME_EVENT_ORIGIN, 0U, nullptr, D3D12XBOX_SCHEDULE_FRAME_EVENT_FLAG_NONE);
if (hr < 0) ReportDxError(hr, __LINE__);

// Prepare first pipeline token
drv->pipelineToken = D3D12XBOX_FRAME_PIPELINE_TOKEN_NULL;
Expand Down

0 comments on commit e8f74ea

Please sign in to comment.