mirror of
https://github.com/holub/mame
synced 2025-07-03 09:06:08 +03:00
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:
commit
ad34f923c3
@ -801,8 +801,12 @@ void renderer_d3d9::update_gamma_ramp()
|
|||||||
// device_create
|
// 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 a device exists, free it
|
||||||
if (m_device != nullptr)
|
if (m_device != nullptr)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user