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