From 5f7de5808068bb283a90e4ee9d09c0435aabfe91 Mon Sep 17 00:00:00 2001 From: alphanu1 <37101891+alphanu1@users.noreply.github.com> Date: Fri, 1 Feb 2019 20:30:44 +0000 Subject: [PATCH] Fix restore resolution for auto detect with single output --- gfx/display_servers/dispserv_x11.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gfx/display_servers/dispserv_x11.c b/gfx/display_servers/dispserv_x11.c index 20ebd80d2f..a0f0ff2b2a 100644 --- a/gfx/display_servers/dispserv_x11.c +++ b/gfx/display_servers/dispserv_x11.c @@ -274,6 +274,8 @@ static bool x11_display_server_set_resolution(void *data, { XRROutputInfo *outputs = XRRGetOutputInfo (dsp, res, res->outputs[i]); + if (res->noutput < 2) + snprintf(orig_output, sizeof(orig_output),"%s", outputs->name); if (outputs->connection == RR_Connected) {