mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- Fixed: IDirect3D9::CreateDevice() can return D3DERR_DEVICELOST if you want exclusive mode and
some other application already has it. While technically this is a failure, the device is still created, so we can continue using it anyway. SVN r2326 (trunk)
This commit is contained in:
parent
1c8397e86d
commit
b2a4ffc718
1 changed files with 9 additions and 7 deletions
|
@ -322,19 +322,23 @@ D3DFB::D3DFB (int width, int height, bool fullscreen)
|
|||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = D3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, Window,
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &d3dpp, &D3DDevice)))
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &d3dpp, &D3DDevice)) &&
|
||||
hr != D3DERR_DEVICELOST)
|
||||
{
|
||||
if (FAILED(D3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, Window,
|
||||
D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &d3dpp, &D3DDevice)))
|
||||
D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &d3dpp, &D3DDevice)) &&
|
||||
hr != D3DERR_DEVICELOST)
|
||||
{
|
||||
if (d3dpp.FullScreen_RefreshRateInHz != 0)
|
||||
{
|
||||
d3dpp.FullScreen_RefreshRateInHz = 0;
|
||||
if (FAILED(hr = D3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, Window,
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &d3dpp, &D3DDevice)))
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &d3dpp, &D3DDevice)) &&
|
||||
hr != D3DERR_DEVICELOST)
|
||||
{
|
||||
if (FAILED(D3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, Window,
|
||||
D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &d3dpp, &D3DDevice)))
|
||||
D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &d3dpp, &D3DDevice)) &&
|
||||
hr != D3DERR_DEVICELOST)
|
||||
{
|
||||
D3DDevice = NULL;
|
||||
}
|
||||
|
@ -360,9 +364,7 @@ D3DFB::D3DFB (int width, int height, bool fullscreen)
|
|||
{
|
||||
DeviceCaps.LineCaps |= D3DLINECAPS_ANTIALIAS;
|
||||
}
|
||||
// I don't know about ATI's drivers. The only ATI device
|
||||
// I have readily available to test with (a Mobility X300)
|
||||
// really doesn't support them.
|
||||
// ATI's drivers apparently also lie, so screw this cap.
|
||||
}
|
||||
CreateResources();
|
||||
SetInitialState();
|
||||
|
|
Loading…
Reference in a new issue