Sign in to follow this  

Why Does IDirect3D9::CheckDeviceType Faile all of a sudden

Recommended Posts

Hi All.
i have no idea why this code fails

IDirect3D9 *d3d;
HRESULT _result = S_OK;

if((d3d = Direct3DCreate9(D3D_SDK_VERSION)) == NULL)
_result = d3d->CheckDeviceType(D3DADAPTER_DEFAULT,

_d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;

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.

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

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