Windows: Fixed D3D multimonitor support. [GroovyMAME]

This commit is contained in:
Michaël Banaan Ananas 2013-12-16 16:08:45 +00:00
parent d3ba7dd645
commit 87f19ee379
3 changed files with 5 additions and 1 deletions

View File

@ -903,7 +903,7 @@ try_again:
D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE;
// create the D3D device
result = (*d3dintf->d3d.create_device)(d3dintf, m_adapter, D3DDEVTYPE_HAL, m_window->hwnd,
result = (*d3dintf->d3d.create_device)(d3dintf, m_adapter, D3DDEVTYPE_HAL, m_window->focus_hwnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &m_presentation, &m_device);
if (result != D3D_OK)
{

View File

@ -1178,6 +1178,9 @@ static int complete_create(win_window_info *window)
if (window->hwnd == NULL)
return 1;
// set window #0 as the focus window for all windows, required for D3D & multimonitor
window->focus_hwnd = win_window_list->hwnd;
// set a pointer back to us
SetWindowLongPtr(window->hwnd, GWLP_USERDATA, (LONG_PTR)window);

View File

@ -45,6 +45,7 @@ public:
// window handle and info
HWND hwnd;
HWND focus_hwnd;
char title[256];
RECT non_fullscreen_bounds;
int startmaximized;