Commit d8434475 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use the device name stored in the adapter in wined3d_set_adapter_display_mode().

parent 56c518af
......@@ -3127,7 +3127,7 @@ HRESULT CDECL wined3d_set_adapter_display_mode(struct wined3d *wined3d,
return WINED3D_OK;
}
ret = ChangeDisplaySettingsExW(NULL, &devmode, NULL, CDS_FULLSCREEN, NULL);
ret = ChangeDisplaySettingsExW(adapter->DeviceName, &devmode, NULL, CDS_FULLSCREEN, NULL);
if (ret != DISP_CHANGE_SUCCESSFUL)
{
if (devmode.dmDisplayFrequency)
......@@ -3135,7 +3135,7 @@ HRESULT CDECL wined3d_set_adapter_display_mode(struct wined3d *wined3d,
WARN("ChangeDisplaySettingsExW failed, trying without the refresh rate.\n");
devmode.dmFields &= ~DM_DISPLAYFREQUENCY;
devmode.dmDisplayFrequency = 0;
ret = ChangeDisplaySettingsExW(NULL, &devmode, NULL, CDS_FULLSCREEN, NULL);
ret = ChangeDisplaySettingsExW(adapter->DeviceName, &devmode, NULL, CDS_FULLSCREEN, NULL);
}
if (ret != DISP_CHANGE_SUCCESSFUL)
return WINED3DERR_NOTAVAILABLE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment