Commit e4ebeb95 by apatrick@chromium.org

Do not call GetAdapterDisplayMode after Display has been initialized.

Some AMD drivers fail with D3DERR_NOTAVAILABLE after the machine has been in sleep mode and never seem to recover for a given IDirect3D9 object. I reproduced with Catalyst 9.12.0.0 and a Radeon 7700. Instead, record the display mode at the time the it was initialized and thereafter use its format as the argument to CheckDeviceFormat etc. Previously, CheckDeviceFormat was passed an uninitialized value as the format if GetAdapterDisplayMode failed. See http://crbug.com/229950 Review URL: https://codereview.appspot.com/8677044 git-svn-id: https://angleproject.googlecode.com/svn/trunk@2183 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 1cae6d22
...@@ -125,6 +125,7 @@ class Display ...@@ -125,6 +125,7 @@ class Display
UINT mAdapter; UINT mAdapter;
D3DDEVTYPE mDeviceType; D3DDEVTYPE mDeviceType;
D3DDISPLAYMODE mDisplayMode;
IDirect3D9 *mD3d9; // Always valid after successful initialization. IDirect3D9 *mD3d9; // Always valid after successful initialization.
IDirect3D9Ex *mD3d9Ex; // Might be null if D3D9Ex is not supported. IDirect3D9Ex *mD3d9Ex; // Might be null if D3D9Ex is not supported.
IDirect3DDevice9 *mDevice; IDirect3DDevice9 *mDevice;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment