Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

No way to get status code from SwapChain(X).Present? #746

Closed
waltdestler opened this issue May 28, 2016 · 1 comment · Fixed by #750
Closed

No way to get status code from SwapChain(X).Present? #746

waltdestler opened this issue May 28, 2016 · 1 comment · Fixed by #750

Comments

@waltdestler
Copy link
Contributor

IDXGISwapChain::Present can return the non-error status code DXGI_STATUS_OCCLUDED when the game window is not visible. (This is especially useful when paired with DXGI_PRESENT_TEST.)

But unless I'm missing something, I see no way of getting this status code in SharpDX (It's not an error, so SharpDX won't throw an exception for it), even though there's already an existing DXGIStatus enum.

What's the best API design for getting this status code? Just return it from Present? I can look into making the desired API change myself, once I know what that desired change is and that there's no existing way to get the status code.

@xoofx
Copy link
Member

xoofx commented May 30, 2016

Try by adding the property hresult='true' to the xml mapping on the DXGI.SwapChain.Present method. This will require a PR after. Thanks!

waltdestler added a commit to waltdestler/SharpDX that referenced this issue May 30, 2016
…s so that the application can check whether the window is occluded. This should resolve sharpdx#746.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants