Thanks for testing!
Now I at least know where it crashed, not necessarily why. It crashed because d3d->CreateDevice(...) failed. It might be because when you have voodo gfx gard, you have several gfx adapters (according to DirectX) and some doesn't work with windowed mode.
I have now updated the debug version so that it retries all possible combinations of arguments for CreateDevice(...) . One of them should hopefully work on your computer. Please test again.
Regards,
Håkan Sundell
PS. I attach the code that I use for creating the DirectX device in case some experts might have some clue
...
if(mode.window) {
g_presentation.hDeviceWindow = g_window;
g_presentation.FullScreen_RefreshRateInHz=0;
}
else {
g_presentation.hDeviceWindow = g_topWindow;
g_presentation.FullScreen_RefreshRateInHz=refreshRate;
}
g_presentation.BackBufferWidth=mode.width;
g_presentation.BackBufferHeight=mode.height;
g_presentation.Windowed=mode.window;
g_presentation.BackBufferFormat=(D3DFORMAT)mode.format;
if(mode.window) {
g_device=NULL;
int adapter;
for(adapter=(-1);adapter<(int)d3d->GetAdapterCount();adapter++) {
hr = d3d->
CreateDevice(adapter==(-1)?D3DADAPTER_DEFAULT:adapter, D3DDEVTYPE_HAL, g_window,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&g_presentation, (IDirect3DDevice9 **)&g_device);
if(hr==D3D_OK) break;
hr = d3d->
CreateDevice(adapter==(-1)?D3DADAPTER_DEFAULT:adapter, D3DDEVTYPE_REF, g_window,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&g_presentation, (IDirect3DDevice9 **)&g_device);
if(hr==D3D_OK) break;
hr = d3d->
CreateDevice(adapter==(-1)?D3DADAPTER_DEFAULT:adapter, D3DDEVTYPE_SW, g_window,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&g_presentation, (IDirect3DDevice9 **)&g_device);
if(hr==D3D_OK) break;
}
if(hr!=D3D_OK) {
if(hr==D3DERR_INVALIDCALL)
MessageBox( g_window, "Direct3D Init FAILED - CreateDevice D3DERR_INVALIDCALL", "CCS64", MB_OK );
else if(hr==D3DERR_NOTAVAILABLE)
MessageBox( g_window, "Direct3D Init FAILED - CreateDevice D3DERR_NOTAVAILABLE", "CCS64", MB_OK );
else if(hr==D3DERR_OUTOFVIDEOMEMORY)
MessageBox( g_window, "Direct3D Init FAILED - CreateDevice D3DERR_OUTOFVIDEOMEMORY", "CCS64", MB_OK );
return 1;
}
if(lpdiMouse) {
hr=lpdiMouse->Unacquire();
hr=lpdiMouse->SetCooperativeLevel(g_topWindow,DISCL_FOREGROUND|DISCL_NONEXCLUSIVE);
hr=lpdiMouse->Acquire();
}
}
else {
hr = d3d->
CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_topWindow,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&g_presentation, (IDirect3DDevice9 **)&g_device);
if(lpdiMouse) {
hr=lpdiMouse->Unacquire();
hr=lpdiMouse->SetCooperativeLevel(g_topWindow,DISCL_FOREGROUND|DISCL_EXCLUSIVE);
hr=lpdiMouse->Acquire();
}
}
...
// device presentation parameters
D3DPRESENT_PARAMETERS g_presentation = {
// width, height, format, number of back buffers
0, 0, D3DFMT_X8R8G8B8, 1,
// multisample type, swap effect, device window, windowed
D3DMULTISAMPLE_NONE, 0, D3DSWAPEFFECT_COPY, g_window, TRUE,
// auto depth/stencil surface, depth/stencil surface format
FALSE, D3DFMT_D16, D3DPRESENTFLAG_LOCKABLE_BACKBUFFER | D3DPRESENTFLAG_VIDEO | D3DPRESENTFLAG_DEVICECLIP, D3DPRESENT_RATE_DEFAULT , D3DPRESENT_INTERVAL_DEFAULT
};
...