mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
Merge pull request #12215 from akallabeth/rdp-monitor-log
Rdp monitor log
This commit is contained in:
@@ -465,7 +465,23 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight)
|
||||
attrs->physicalHeight =
|
||||
WINPR_ASSERTING_INT_CAST(uint32_t, rrmonitors[i].mheight);
|
||||
ret = XRRRotations(xfc->display, WINPR_ASSERTING_INT_CAST(int, i), &rot);
|
||||
attrs->orientation = ret;
|
||||
switch (rot & ret)
|
||||
{
|
||||
|
||||
case RR_Rotate_90:
|
||||
attrs->orientation = ORIENTATION_PORTRAIT;
|
||||
break;
|
||||
case RR_Rotate_180:
|
||||
attrs->orientation = ORIENTATION_LANDSCAPE_FLIPPED;
|
||||
break;
|
||||
case RR_Rotate_270:
|
||||
attrs->orientation = ORIENTATION_PORTRAIT_FLIPPED;
|
||||
break;
|
||||
case RR_Rotate_0:
|
||||
default:
|
||||
attrs->orientation = ORIENTATION_LANDSCAPE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -107,7 +107,7 @@ extern "C"
|
||||
* @param type The value to convert
|
||||
* @return A constant string representation of \ref type or the string \b
|
||||
* UNKNOWN for an invalid value
|
||||
* @since verstion 3.22.0
|
||||
* @since version 3.22.0
|
||||
*/
|
||||
FREERDP_API WINPR_ATTR_NODISCARD const char* rdpdr_device_type_string(UINT32 type);
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ extern "C"
|
||||
* @param flags The value to convert
|
||||
* @return A constant string representation of \ref flags or the string \b ORIENTATION_UNKNOWN
|
||||
* for an invalid value
|
||||
* @since verstion 3.22.0
|
||||
* @since version 3.22.0
|
||||
*/
|
||||
FREERDP_API WINPR_ATTR_NODISCARD const char*
|
||||
freerdp_desktop_rotation_flags_to_string(UINT32 flags);
|
||||
@@ -65,7 +65,7 @@ extern "C"
|
||||
* @param flags The value to convert
|
||||
* @return A constant string representation of \ref flag or the string \b
|
||||
* RDPINPUT_CONTACT_FLAG_UNKNOWN for an invalid value
|
||||
* @since verstion 3.22.0
|
||||
* @since version 3.22.0
|
||||
*/
|
||||
FREERDP_API WINPR_ATTR_NODISCARD const char* freerdp_input_touch_state_string(DWORD flags);
|
||||
|
||||
@@ -74,7 +74,7 @@ extern "C"
|
||||
* @param type The value to convert
|
||||
* @return A constant string representation of \ref type or the string \b
|
||||
* UNKNOWN for an invalid value
|
||||
* @since verstion 3.22.0
|
||||
* @since version 3.22.0
|
||||
*/
|
||||
FREERDP_API WINPR_ATTR_NODISCARD const char* freerdp_order_support_flags_string(UINT8 type);
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <freerdp/version.h>
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/utils/string.h>
|
||||
#include <freerdp/utils/helpers.h>
|
||||
#include <freerdp/build-config.h>
|
||||
|
||||
@@ -567,10 +568,12 @@ static void log_monitor(UINT32 idx, const rdpMonitor* monitor, wLog* log, DWORD
|
||||
|
||||
WLog_Print(log, level,
|
||||
"[%" PRIu32 "] [%s] {%dx%d-%dx%d} [%" PRIu32 "] {%" PRIu32 "x%" PRIu32
|
||||
", orientation: %" PRIu32 ", desktopScale: %" PRIu32 ", deviceScale: %" PRIu32 "}",
|
||||
", orientation: %s [%" PRIu32 "], desktopScale: %" PRIu32 ", deviceScale: %" PRIu32
|
||||
"}",
|
||||
idx, monitor->is_primary ? "primary" : " ", monitor->x, monitor->y,
|
||||
monitor->width, monitor->height, monitor->orig_screen,
|
||||
monitor->attributes.physicalWidth, monitor->attributes.physicalHeight,
|
||||
freerdp_desktop_rotation_flags_to_string(monitor->attributes.orientation),
|
||||
monitor->attributes.orientation, monitor->attributes.desktopScaleFactor,
|
||||
monitor->attributes.deviceScaleFactor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user