mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
internal/graphicsdriver/directx: bug fix: wrong pointer usage
This commit is contained in:
parent
10af36ee9f
commit
8311ff1e46
@ -1755,6 +1755,8 @@ func (i *_ID3D12Device) SetFrameIntervalX(pOutputSyncTarget *_IDXGIOutput, lengt
|
||||
|
||||
func (i *_ID3D12Device) QueryInterface(riid *windows.GUID, ppvObject *unsafe.Pointer) error {
|
||||
r, _, _ := syscall.Syscall(i.vtbl.QueryInterface, 3, uintptr(unsafe.Pointer(i)), uintptr(unsafe.Pointer(riid)), uintptr(unsafe.Pointer(ppvObject)))
|
||||
runtime.KeepAlive(riid)
|
||||
runtime.KeepAlive(ppvObject)
|
||||
if uint32(r) != uint32(windows.S_OK) {
|
||||
return fmt.Errorf("directx: ID3D12Device::QueryInterface failed: HRESULT(%d)", uint32(r))
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ func (g *Graphics) initializeXbox(useWARP bool, useDebugLayer bool) (ferr error)
|
||||
}
|
||||
|
||||
var dxgiDevice *_IDXGIDevice
|
||||
if err := g.device.QueryInterface(&_IID_IDXGIDevice, (*unsafe.Pointer)(unsafe.Pointer(dxgiDevice))); err != nil {
|
||||
if err := g.device.QueryInterface(&_IID_IDXGIDevice, (*unsafe.Pointer)(unsafe.Pointer(&dxgiDevice))); err != nil {
|
||||
return err
|
||||
}
|
||||
defer dxgiDevice.Release()
|
||||
|
Loading…
Reference in New Issue
Block a user