mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 03:23:37 +00:00
win32u: Remove monitor name from gdi driver monitor info.
This commit is contained in:
parent
ec9610c46b
commit
6bc1eea718
|
@ -1311,12 +1311,11 @@ static void add_monitor( const struct gdi_monitor *monitor, void *param )
|
|||
static const WCHAR default_monitorW[] =
|
||||
{'M','O','N','I','T','O','R','\\','D','e','f','a','u','l','t','_','M','o','n','i','t','o','r',0,0};
|
||||
|
||||
TRACE( "%s %s %s\n", debugstr_w(monitor->name), wine_dbgstr_rect(&monitor->rc_monitor),
|
||||
wine_dbgstr_rect(&monitor->rc_work) );
|
||||
|
||||
monitor_index = ctx->monitor_count++;
|
||||
output_index = ctx->output_count++;
|
||||
|
||||
TRACE( "%u %s %s\n", monitor_index, wine_dbgstr_rect(&monitor->rc_monitor), wine_dbgstr_rect(&monitor->rc_work) );
|
||||
|
||||
sprintf( buffer, "MonitorID%u", monitor_index );
|
||||
sprintf( instance, "DISPLAY\\Default_Monitor\\%04X&%04X", ctx->video_count - 1, monitor_index );
|
||||
set_reg_ascii_value( ctx->adapter_key, buffer, instance );
|
||||
|
@ -1327,8 +1326,7 @@ static void add_monitor( const struct gdi_monitor *monitor, void *param )
|
|||
|
||||
link_device( bufferW, guid_devinterface_monitorW );
|
||||
|
||||
lstrcpyW( bufferW, monitor->name );
|
||||
if (!bufferW[0]) asciiz_to_unicode( bufferW, "Generic Non-PnP Monitor" );
|
||||
asciiz_to_unicode( bufferW, "Generic Non-PnP Monitor" );
|
||||
set_reg_value( hkey, device_descW, REG_SZ, bufferW, (lstrlenW( bufferW ) + 1) * sizeof(WCHAR) );
|
||||
|
||||
set_reg_value( hkey, classW, REG_SZ, monitorW, sizeof(monitorW) );
|
||||
|
|
|
@ -675,7 +675,6 @@ int macdrv_get_monitors(uint32_t adapter_id, struct macdrv_monitor** new_monitor
|
|||
if (j == 0)
|
||||
primary_index = monitor_count;
|
||||
|
||||
strcpy(monitors[monitor_count].name, "Generic Non-PnP Monitor");
|
||||
monitors[monitor_count].state_flags = DISPLAY_DEVICE_ATTACHED | DISPLAY_DEVICE_ACTIVE;
|
||||
monitors[monitor_count].rc_monitor = displays[j].frame;
|
||||
monitors[monitor_count].rc_work = displays[j].work_frame;
|
||||
|
|
|
@ -1192,9 +1192,6 @@ BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
|
|||
.rc_work = rect_from_cgrect(monitor->rc_work),
|
||||
.state_flags = monitor->state_flags,
|
||||
};
|
||||
RtlUTF8ToUnicodeN(gdi_monitor.name, sizeof(gdi_monitor.name), &len,
|
||||
monitor->name, strlen(monitor->name));
|
||||
TRACE("monitor: %s\n", debugstr_a(monitor->name));
|
||||
device_manager->add_monitor( &gdi_monitor, param );
|
||||
}
|
||||
|
||||
|
|
|
@ -291,8 +291,6 @@ static inline CGPoint cgpoint_win_from_mac(CGPoint point)
|
|||
/* Represent a monitor in EnumDisplayDevices context */
|
||||
struct macdrv_monitor
|
||||
{
|
||||
/* Name, in UTF-8 encoding */
|
||||
char name[128];
|
||||
/* as RcMonitor in MONITORINFO struct after conversion by rect_from_cgrect */
|
||||
CGRect rc_monitor;
|
||||
/* as RcWork in MONITORINFO struct after conversion by rect_from_cgrect */
|
||||
|
|
|
@ -287,15 +287,11 @@ static void X11DRV_desktop_free_adapters( struct gdi_adapter *adapters )
|
|||
|
||||
static BOOL X11DRV_desktop_get_monitors( ULONG_PTR adapter_id, struct gdi_monitor **new_monitors, int *count )
|
||||
{
|
||||
static const WCHAR generic_nonpnp_monitorW[] = {
|
||||
'G','e','n','e','r','i','c',' ',
|
||||
'N','o','n','-','P','n','P',' ','M','o','n','i','t','o','r',0};
|
||||
struct gdi_monitor *monitor;
|
||||
|
||||
monitor = calloc( 1, sizeof(*monitor) );
|
||||
if (!monitor) return FALSE;
|
||||
|
||||
lstrcpyW( monitor->name, generic_nonpnp_monitorW );
|
||||
SetRect( &monitor->rc_monitor, 0, 0, desktop_width, desktop_height );
|
||||
SetRect( &monitor->rc_work, 0, 0, desktop_width, desktop_height );
|
||||
query_desktop_work_area( &monitor->rc_work );
|
||||
|
|
|
@ -589,10 +589,7 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
|
|||
|
||||
/* Initialize monitors */
|
||||
for (monitor = 0; monitor < monitor_count; monitor++)
|
||||
{
|
||||
TRACE("monitor: %#x %s\n", monitor, wine_dbgstr_w(monitors[monitor].name));
|
||||
device_manager->add_monitor( &monitors[monitor], param );
|
||||
}
|
||||
|
||||
handler->free_monitors(monitors, monitor_count);
|
||||
|
||||
|
|
|
@ -287,9 +287,6 @@ static void xinerama_free_adapters( struct gdi_adapter *adapters )
|
|||
|
||||
static BOOL xinerama_get_monitors( ULONG_PTR adapter_id, struct gdi_monitor **new_monitors, int *count )
|
||||
{
|
||||
static const WCHAR generic_nonpnp_monitorW[] = {
|
||||
'G','e','n','e','r','i','c',' ',
|
||||
'N','o','n','-','P','n','P',' ','M','o','n','i','t','o','r',0};
|
||||
struct gdi_monitor *monitor;
|
||||
INT first = (INT)adapter_id;
|
||||
INT monitor_count = 0;
|
||||
|
@ -319,7 +316,6 @@ static BOOL xinerama_get_monitors( ULONG_PTR adapter_id, struct gdi_monitor **ne
|
|||
|| (EqualRect( &monitors[i].rcMonitor, &monitors[first].rcMonitor )
|
||||
&& !IsRectEmpty( &monitors[first].rcMonitor )))
|
||||
{
|
||||
lstrcpyW( monitor[index].name, generic_nonpnp_monitorW );
|
||||
monitor[index].rc_monitor = monitors[i].rcMonitor;
|
||||
monitor[index].rc_work = monitors[i].rcWork;
|
||||
/* Xinerama only reports monitors already attached */
|
||||
|
|
|
@ -1027,9 +1027,6 @@ static void xrandr14_free_adapters( struct gdi_adapter *adapters )
|
|||
|
||||
static BOOL xrandr14_get_monitors( ULONG_PTR adapter_id, struct gdi_monitor **new_monitors, int *count )
|
||||
{
|
||||
static const WCHAR generic_nonpnp_monitorW[] = {
|
||||
'G','e','n','e','r','i','c',' ',
|
||||
'N','o','n','-','P','n','P',' ','M','o','n','i','t','o','r',0};
|
||||
struct gdi_monitor *realloc_monitors, *monitors = NULL;
|
||||
XRRScreenResources *screen_resources = NULL;
|
||||
XRROutputInfo *output_info = NULL, *enum_output_info = NULL;
|
||||
|
@ -1063,7 +1060,6 @@ static BOOL xrandr14_get_monitors( ULONG_PTR adapter_id, struct gdi_monitor **ne
|
|||
/* Inactive but attached monitor, no need to check for mirrored/replica monitors */
|
||||
if (!output_info->crtc || !crtc_info->mode)
|
||||
{
|
||||
lstrcpyW( monitors[monitor_count].name, generic_nonpnp_monitorW );
|
||||
monitors[monitor_count].state_flags = DISPLAY_DEVICE_ATTACHED;
|
||||
monitors[monitor_count].edid_len = get_edid( adapter_id, &monitors[monitor_count].edid );
|
||||
monitor_count = 1;
|
||||
|
@ -1108,9 +1104,6 @@ static BOOL xrandr14_get_monitors( ULONG_PTR adapter_id, struct gdi_monitor **ne
|
|||
enum_crtc_info->width == crtc_info->width &&
|
||||
enum_crtc_info->height == crtc_info->height)
|
||||
{
|
||||
/* FIXME: Read output EDID property and parse the data to get the correct name */
|
||||
lstrcpyW( monitors[monitor_count].name, generic_nonpnp_monitorW );
|
||||
|
||||
SetRect( &monitors[monitor_count].rc_monitor, crtc_info->x, crtc_info->y,
|
||||
crtc_info->x + crtc_info->width, crtc_info->y + crtc_info->height );
|
||||
monitors[monitor_count].rc_work = get_work_area( &monitors[monitor_count].rc_monitor );
|
||||
|
|
|
@ -253,7 +253,6 @@ struct gdi_adapter
|
|||
|
||||
struct gdi_monitor
|
||||
{
|
||||
WCHAR name[128]; /* name */
|
||||
RECT rc_monitor; /* RcMonitor in MONITORINFO struct */
|
||||
RECT rc_work; /* RcWork in MONITORINFO struct */
|
||||
DWORD state_flags; /* StateFlags in DISPLAY_DEVICE struct */
|
||||
|
|
Loading…
Reference in a new issue