Sign in to follow this  

Why Does IDirect3D9::CheckDeviceType Faile all of a sudden

This topic is 2391 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All.
i have no idea why this code fails

[code]
IDirect3D9 *d3d;
HRESULT _result = S_OK;

if((d3d = Direct3DCreate9(D3D_SDK_VERSION)) == NULL)
d3d->Release();
else
{
_result = d3d->CheckDeviceType(D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
D3DFMT_UNKNOWN,
D3DFMT_UNKNOWN,
TRUE);

if(FAILED(_result))
{
_d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
}
}
[/code]

it just suddenly stoped working, and i have no idea why.
i tried using the D3D Debug Runtime and it said that the format i tried was not supported, even though it said my Graphics Card Supported it 10 Minutes ago.
even though it says its not supported i set it to the format that was working, and you know what, it woked even though CheckDeviceType said it wont.

Any idea how to fix this ?
Thanks in Advance.

---edit---
cleaned up the code

Share this post


Link to post
Share on other sites
this is more of a bushwaked verison of what i used, the code i use is in a dll and i dont want to recompile for simple checks.
but my point is that CheckDeviceType says that D3DFMT_UNKOWN is not supported, as well as D3DFMT_A8R8G8B8, D3DFMT_X8R8G8B8 and D3DFMT_R5G6B5

Share this post


Link to post
Share on other sites

This topic is 2391 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this