Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
- return STATUS_NOT_SUPPORTED; + if (!lock_display_devices()) return STATUS_UNSUCCESSFUL; + + memset( &target_name->flags, 0, sizeof(*target_name) - offsetof(DISPLAYCONFIG_TARGET_DEVICE_NAME, flags) ); + + LIST_FOR_EACH_ENTRY(monitor, &monitors, struct monitor, entry) + { + if (target_name->header.id != monitor->output_id) continue; + if (memcmp( &target_name->header.adapterId, &monitor->adapter->gpu_luid, + sizeof(monitor->adapter->gpu_luid) )) + continue; + + /* FIXME: get real monitor name. */ + snprintf( buffer, ARRAY_SIZE(buffer), "Display%u", monitor->output_id + 1 ); + asciiz_to_unicode( target_name->monitorFriendlyDeviceName, buffer ); + target_name->flags.friendlyNameForced = 1; According to MSDN regarding friendlyNameForced, "A UINT32 value that indicates that the target is forced with no detectable monitor attached and the monitorFriendlyDeviceName member of the DISPLAYCONFIG_TARGET_DEVICE_NAME structure is a NULL-terminated empty string.". So it seems setting friendlyNameForced to 1 is wrong.
outputTechnology is initialized to 0 and DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HD15 is 0. Maybe use a more appropriate type? i.e., DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1157#note_11990