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 18.104.22.168 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.
Review URL: https://codereview.appspot.com/8677044
git-svn-id: http://angleproject.googlecode.com/svn/trunk@2183 736b8ea6-26fd-11df-bfd4-992fa37f6226
2 files changed