mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicsdriver/directx: bug fix: ScheduleFrameEventX might not return S_OK on Xbox One
This commit is contained in:
parent
58f95dd1e0
commit
262ff351f4
@ -1774,7 +1774,8 @@ func (i *_ID3D12Device) GetDeviceRemovedReason() error {
|
||||
func (i *_ID3D12Device) ScheduleFrameEventX(typ _D3D12XBOX_FRAME_EVENT_TYPE, intervalOffsetInMicroseconds uint32, pAncillarySignalList *_D3D12XBOX_SCHEDULE_FRAME_OBJECT_LIST, flags _D3D12XBOX_SCHEDULE_FRAME_EVENT_FLAGS) error {
|
||||
r, _, _ := syscall.Syscall6(i.vtbl.ScheduleFrameEventX, 5, uintptr(unsafe.Pointer(i)), uintptr(typ), uintptr(intervalOffsetInMicroseconds), uintptr(unsafe.Pointer(pAncillarySignalList)), uintptr(flags), 0)
|
||||
runtime.KeepAlive(pAncillarySignalList)
|
||||
if uint32(r) != uint32(windows.S_OK) {
|
||||
// The return value might not be S_OK on Xbox One.
|
||||
if int32(r) < 0 {
|
||||
return fmt.Errorf("directx: ID3D12Device::ScheduleFrameEventX failed: %w", handleError(windows.Handle(uint32(r))))
|
||||
}
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user