Commit 81406eac authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winemac.drv: Use the primary adapter name instead of calling back win32u.

parent 6aeaeed9
......@@ -685,24 +685,6 @@ void check_retina_status(void)
}
}
static BOOL get_primary_adapter(WCHAR *name)
{
DISPLAY_DEVICEW dd;
DWORD i;
dd.cb = sizeof(dd);
for (i = 0; !NtUserEnumDisplayDevices(NULL, i, &dd, 0); ++i)
{
if (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)
{
lstrcpyW(name, dd.DeviceName);
return TRUE;
}
}
return FALSE;
}
static BOOL is_detached_mode(const DEVMODEW *mode)
{
return mode->dmFields & DM_POSITION &&
......@@ -771,7 +753,6 @@ static CGDisplayModeRef find_best_display_mode(DEVMODEW *devmode, CFArrayRef dis
*/
LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid)
{
WCHAR primary_adapter[CCHDEVICENAME];
LONG ret = DISP_CHANGE_SUCCESSFUL;
DEVMODEW *mode;
int bpp;
......@@ -785,9 +766,6 @@ LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, LPCWSTR primary_name, HWN
init_original_display_mode();
if (!get_primary_adapter(primary_adapter))
return DISP_CHANGE_FAILED;
if (macdrv_get_displays(&macdrv_displays, &num_displays))
return DISP_CHANGE_FAILED;
......@@ -804,7 +782,7 @@ LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, LPCWSTR primary_name, HWN
for (mode = displays; mode->dmSize && !ret; mode = NEXT_DEVMODEW(mode))
{
if (wcsicmp(primary_adapter, mode->dmDeviceName))
if (wcsicmp(primary_name, mode->dmDeviceName))
{
FIXME("Changing non-primary adapter settings is currently unsupported.\n");
continue;
......
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