From 07fa7e4a13389779e7e950e8a034ba72f59fb5ea Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Mon, 14 Oct 2013 12:25:48 +0100 Subject: [PATCH] Another attempt at odd TV resolution fix. Mike, try this one "live" please Signed-off-by: Chris Michael --- src/bin/e_randr.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/bin/e_randr.c b/src/bin/e_randr.c index faf0c96ef..0b65a280c 100644 --- a/src/bin/e_randr.c +++ b/src/bin/e_randr.c @@ -876,7 +876,6 @@ _e_randr_event_cb_output_change(void *data EINA_UNUSED, int type EINA_UNUSED, vo printf("\t\t\tUsing Crtc Config %d for Cloning\n", crtc_cfg->xid); - /* we found a valid crtc for this output */ output_cfg->crtc = crtc_cfg->xid; output_cfg->exists = (output_cfg->crtc != 0); @@ -896,6 +895,7 @@ _e_randr_event_cb_output_change(void *data EINA_UNUSED, int type EINA_UNUSED, vo { if (modes[c] == mode) { + printf("\t\t\t\tMode: %d\n", mode); can_clone = EINA_TRUE; break; } @@ -911,6 +911,7 @@ _e_randr_event_cb_output_change(void *data EINA_UNUSED, int type EINA_UNUSED, vo ecore_x_randr_mode_size_get(ev->win, mode, &mw, &mh); + printf("\t\t\t\tMode: %d - %d x %d\n", mode, mw, mh); for (c = 0; c < num; c++) { int cw, ch; @@ -918,11 +919,22 @@ _e_randr_event_cb_output_change(void *data EINA_UNUSED, int type EINA_UNUSED, vo ecore_x_randr_mode_size_get(ev->win, modes[c], &cw, &ch); + if ((cw == mw) && (ch == mh)) { mode = modes[c]; break; } + else + { + /* trap for dumb non-standard TV + * resolution of 1360 x 768 */ + if (((cw + 6) == mw) && (ch == mh)) + { + mode = modes[c]; + break; + } + } } }