Merge pull request #6090 from npwoods/d3d_use_root_window

Changed Direct3D renderer to call GetAncestor() in device_create() to get the root window
This commit is contained in:
R. Belmont 2019-12-24 15:36:44 -05:00 committed by GitHub
commit ad34f923c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -801,8 +801,12 @@ void renderer_d3d9::update_gamma_ramp()
// device_create
//============================================================
int renderer_d3d9::device_create(HWND device_hwnd)
int renderer_d3d9::device_create(HWND hwnd)
{
// identify the actual window; this is needed so that -attach_window
// can work on a non-root HWND
HWND device_hwnd = GetAncestor(hwnd, GA_ROOT);
// if a device exists, free it
if (m_device != nullptr)
{