Commit 3e0148ca authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Rename DeviceName to device_name.

parent d94d2c0e
......@@ -730,7 +730,7 @@ HRESULT CDECL wined3d_get_output_desc(const struct wined3d *wined3d, unsigned in
if (FAILED(hr = wined3d_get_adapter_display_mode(wined3d, adapter_idx, &mode, &rotation)))
return hr;
memcpy(desc->device_name, adapter->DeviceName, sizeof(desc->device_name));
memcpy(desc->device_name, adapter->device_name, sizeof(desc->device_name));
SetRect(&desc->desktop_rect, 0, 0, mode.width, mode.height);
OffsetRect(&desc->desktop_rect, adapter->monitor_position.x, adapter->monitor_position.y);
/* FIXME: We should get this from EnumDisplayDevices() when the adapters
......@@ -769,7 +769,7 @@ UINT CDECL wined3d_get_adapter_mode_count(const struct wined3d *wined3d, UINT ad
memset(&mode, 0, sizeof(mode));
mode.dmSize = sizeof(mode);
while (EnumDisplaySettingsExW(adapter->DeviceName, j++, &mode, 0))
while (EnumDisplaySettingsExW(adapter->device_name, j++, &mode, 0))
{
if (mode.dmFields & DM_DISPLAYFLAGS)
{
......@@ -825,7 +825,7 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
while (i <= mode_idx)
{
if (!EnumDisplaySettingsExW(adapter->DeviceName, j++, &m, 0))
if (!EnumDisplaySettingsExW(adapter->device_name, j++, &m, 0))
{
WARN("Invalid mode_idx %u.\n", mode_idx);
return WINED3DERR_INVALIDCALL;
......@@ -994,7 +994,7 @@ HRESULT CDECL wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UI
memset(&m, 0, sizeof(m));
m.dmSize = sizeof(m);
EnumDisplaySettingsExW(adapter->DeviceName, ENUM_CURRENT_SETTINGS, &m, 0);
EnumDisplaySettingsExW(adapter->device_name, ENUM_CURRENT_SETTINGS, &m, 0);
mode->width = m.dmPelsWidth;
mode->height = m.dmPelsHeight;
mode->refresh_rate = DEFAULT_REFRESH_RATE;
......@@ -1097,7 +1097,7 @@ HRESULT CDECL wined3d_set_adapter_display_mode(struct wined3d *wined3d,
}
else
{
if (!EnumDisplaySettingsW(adapter->DeviceName, ENUM_REGISTRY_SETTINGS, &new_mode))
if (!EnumDisplaySettingsW(adapter->device_name, ENUM_REGISTRY_SETTINGS, &new_mode))
{
ERR("Failed to read mode from registry.\n");
return WINED3DERR_NOTAVAILABLE;
......@@ -1106,7 +1106,7 @@ HRESULT CDECL wined3d_set_adapter_display_mode(struct wined3d *wined3d,
}
/* Only change the mode if necessary. */
if (!EnumDisplaySettingsW(adapter->DeviceName, ENUM_CURRENT_SETTINGS, &current_mode))
if (!EnumDisplaySettingsW(adapter->device_name, ENUM_CURRENT_SETTINGS, &current_mode))
{
ERR("Failed to get current display mode.\n");
}
......@@ -1123,7 +1123,7 @@ HRESULT CDECL wined3d_set_adapter_display_mode(struct wined3d *wined3d,
return WINED3D_OK;
}
ret = ChangeDisplaySettingsExW(adapter->DeviceName, &new_mode, NULL, CDS_FULLSCREEN, NULL);
ret = ChangeDisplaySettingsExW(adapter->device_name, &new_mode, NULL, CDS_FULLSCREEN, NULL);
if (ret != DISP_CHANGE_SUCCESSFUL)
{
if (new_mode.dmFields & DM_DISPLAYFREQUENCY)
......@@ -1131,7 +1131,7 @@ HRESULT CDECL wined3d_set_adapter_display_mode(struct wined3d *wined3d,
WARN("ChangeDisplaySettingsExW failed, trying without the refresh rate.\n");
new_mode.dmFields &= ~DM_DISPLAYFREQUENCY;
new_mode.dmDisplayFrequency = 0;
ret = ChangeDisplaySettingsExW(adapter->DeviceName, &new_mode, NULL, CDS_FULLSCREEN, NULL);
ret = ChangeDisplaySettingsExW(adapter->device_name, &new_mode, NULL, CDS_FULLSCREEN, NULL);
}
if (ret != DISP_CHANGE_SUCCESSFUL)
return WINED3DERR_NOTAVAILABLE;
......@@ -1182,7 +1182,7 @@ HRESULT CDECL wined3d_get_adapter_identifier(const struct wined3d *wined3d,
/* Note that d3d8 doesn't supply a device name. */
if (identifier->device_name_size)
{
if (!WideCharToMultiByte(CP_ACP, 0, adapter->DeviceName, -1, identifier->device_name,
if (!WideCharToMultiByte(CP_ACP, 0, adapter->device_name, -1, identifier->device_name,
identifier->device_name_size, NULL, NULL))
{
ERR("Failed to convert device name, last error %#x.\n", GetLastError());
......@@ -2516,8 +2516,8 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int o
display_device.cb = sizeof(display_device);
EnumDisplayDevicesW(NULL, ordinal, &display_device, 0);
TRACE("Display device: %s\n", debugstr_w(display_device.DeviceName));
strcpyW(adapter->DeviceName, display_device.DeviceName);
TRACE("Display device: %s.\n", debugstr_w(display_device.DeviceName));
strcpyW(adapter->device_name, display_device.DeviceName);
if (!AllocateLocallyUniqueId(&adapter->luid))
{
......
......@@ -2674,13 +2674,14 @@ struct wined3d_adapter
struct wined3d_gl_info gl_info;
struct wined3d_d3d_info d3d_info;
struct wined3d_driver_info driver_info;
WCHAR DeviceName[CCHDEVICENAME]; /* DeviceName for use with e.g. ChangeDisplaySettings */
unsigned int cfg_count;
struct wined3d_pixel_format *cfgs;
UINT64 vram_bytes;
UINT64 vram_bytes_used;
LUID luid;
WCHAR device_name[CCHDEVICENAME]; /* for use with e.g. ChangeDisplaySettings() */
void *formats;
size_t format_size;
......
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