mirror of
https://github.com/holub/mame
synced 2025-04-24 01:11:11 +03:00
Changed Direct3D renderer to call GetAncestor() in device_create() to
get the root window This is to make -attach_window work with non-root windows
This commit is contained in:
parent
6a457210e8
commit
dd8f98b56d
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user