diff options
author | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-01 22:43:44 +0000 |
---|---|---|
committer | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-01 22:43:44 +0000 |
commit | 9c5b9aab4e335983eb6d89f180a9e60a9617315d (patch) | |
tree | d4b2fcf95a8e7ba4fdf6cf50586ac43484f87146 /o3d | |
parent | 9e609db4c534486377077dc4b058f08ab1de2a60 (diff) | |
download | chromium_src-9c5b9aab4e335983eb6d89f180a9e60a9617315d.zip chromium_src-9c5b9aab4e335983eb6d89f180a9e60a9617315d.tar.gz chromium_src-9c5b9aab4e335983eb6d89f180a9e60a9617315d.tar.bz2 |
When an o3d window does not belong to any monitor (off screen), instead of failing, use the default monitor/adapter instead.
Review URL: http://codereview.chromium.org/661300
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40311 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/core/win/d3d9/renderer_d3d9.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/o3d/core/win/d3d9/renderer_d3d9.cc b/o3d/core/win/d3d9/renderer_d3d9.cc index 2e55ddd..fe36184 100644 --- a/o3d/core/win/d3d9/renderer_d3d9.cc +++ b/o3d/core/win/d3d9/renderer_d3d9.cc @@ -355,13 +355,7 @@ Renderer::InitStatus CreateDirect3D(Direct3DCreate9_Ptr d3d_create_function, } // Get the current monitor and adapter. - *monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONULL); - if (*monitor == NULL) { - DLOG(ERROR) << "Failed to get monitor from window"; - (*d3d)->Release(); - *d3d = NULL; - return Renderer::INITIALIZATION_ERROR; - } + *monitor = MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY); if (!GetAdapterFromMonitor(*d3d, *monitor, adapter)) { DLOG(WARNING) << "Failed to get adapter, use the default one"; *adapter = D3DADAPTER_DEFAULT; |