diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-04-10 21:20:34 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-04-10 21:20:34 +0200 |
commit | efbbf1af8739b42f7829d5da459f3467252671ec (patch) | |
tree | 02143fc4b7c78618e639d2783848458caacbc762 /src | |
parent | 79f6f7c1791a35a620cd6a00287083016f746353 (diff) |
Use rotated monitor size in monitor description
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index b0606c7..f743a8e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1804,11 +1804,13 @@ static GtkWidget* create_common_settings_page(GtkStack *stack, GtkApplication *a if(gpu_inf.vendor == GPU_VENDOR_NVIDIA) gtk_combo_box_text_append(record_area_selection_menu, "screen-direct-force", "All monitors (for VRR. No cursor, may have driver issues. Only use with VRR monitors!)"); - for_each_active_monitor_output(gdk_x11_get_default_xdisplay(), [&](const XRROutputInfo *output_info, const XRRCrtcInfo*, const XRRModeInfo *mode_info) { + for_each_active_monitor_output(gdk_x11_get_default_xdisplay(), [&](const XRROutputInfo *output_info, const XRRCrtcInfo *crtc_info, const XRRModeInfo*) { std::string label = "Monitor "; label.append(output_info->name, output_info->nameLen); label += " ("; - label.append(mode_info->name, mode_info->nameLength); + label += std::to_string(crtc_info->width); + label += "x"; + label += std::to_string(crtc_info->height); if(gpu_inf.vendor != GPU_VENDOR_NVIDIA) label += ", requires root access"; label += ")"; @@ -2328,7 +2330,7 @@ static void load_config(const gpu_info &gpu_inf) { } else { bool found_monitor = false; int monitor_name_size = strlen(config.main_config.record_area_option.c_str()); - for_each_active_monitor_output(gdk_x11_get_default_xdisplay(), [&](const XRROutputInfo *output_info, const XRRCrtcInfo *crtc_info, const XRRModeInfo*) { + for_each_active_monitor_output(gdk_x11_get_default_xdisplay(), [&](const XRROutputInfo *output_info, const XRRCrtcInfo*, const XRRModeInfo*) { if(monitor_name_size == output_info->nameLen && strncmp(config.main_config.record_area_option.c_str(), output_info->name, output_info->nameLen) == 0) { found_monitor = true; } |