From cc1024ddd01535664ff95719b28f0c6a1bd7fc0f Mon Sep 17 00:00:00 2001 From: alphanu1 <37101891+alphanu1@users.noreply.github.com> Date: Tue, 1 May 2018 12:10:32 +0100 Subject: [PATCH 1/2] modeline tweaks, better porches --- gfx/display_servers/dispserv_x11.c | 32 +++++------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/gfx/display_servers/dispserv_x11.c b/gfx/display_servers/dispserv_x11.c index 4a3bd0c465..d001438f33 100644 --- a/gfx/display_servers/dispserv_x11.c +++ b/gfx/display_servers/dispserv_x11.c @@ -98,36 +98,14 @@ static bool x11_set_resolution(void *data, char fbset[150]; char output[150]; - hsp = width*1.10; + hsp = width*1.14; /* set core refresh from hz */ video_monitor_set_refresh_rate(hz); /* following code is the mode line genorator */ - - if (width < 599) - { - hfp = width+8; - hbp = width*1.10; - } - if (width > 599 && width < 1919) - { - hfp = width+16; - hbp = width*1.18; - } - - if (width > 1919 && width < 2559) - { - hfp = width+32; - hbp = width*1.20; - } - - if (width > 2559) - { - hfp = width+48; - hbp = width*1.24; - } - + hfp = width+24; + hbp = width*1.26; hmax = hbp; if (height < 241) @@ -221,14 +199,14 @@ static bool x11_set_resolution(void *data, /* create progressive newmode from modline variables */ if (height < 300) { - sprintf(xrandr,"xrandr --newmode \"%dx%d_%0.2f\" %0.2f %d %d %d %d %d %d %d %d -hsync -vsync", width, height, hz, pixel_clock, width, hfp, hsp, hbp, height, vfp, vsp, vbp); + sprintf(xrandr,"xrandr --newmode \"%dx%d_%0.2f\" %lf %d %d %d %d %d %d %d %d -hsync -vsync", width, height, hz, pixel_clock, width, hfp, hsp, hbp, height, vfp, vsp, vbp); system(xrandr); } /* create interlaced newmode from modline variables */ if (height > 300) { - sprintf(xrandr,"xrandr --newmode \"%dx%d_%0.2f\" %0.2f %d %d %d %d %d %d %d %d interlace -hsync -vsync", width, height, hz, pixel_clock, width, hfp, hsp, hbp, height, vfp, vsp, vbp); + sprintf(xrandr,"xrandr --newmode \"%dx%d_%0.2f\" %lf %d %d %d %d %d %d %d %d interlace -hsync -vsync", width, height, hz, pixel_clock, width, hfp, hsp, hbp, height, vfp, vsp, vbp); system(xrandr); } From 4b8fbf86824cd04b10b3df26dfe00a1bbe659394 Mon Sep 17 00:00:00 2001 From: alphanu1 <37101891+alphanu1@users.noreply.github.com> Date: Tue, 1 May 2018 12:14:25 +0100 Subject: [PATCH 2/2] Better startup resolution for CRT --- gfx/video_crt_switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/video_crt_switch.c b/gfx/video_crt_switch.c index d848ae5ae0..4504a1a34d 100644 --- a/gfx/video_crt_switch.c +++ b/gfx/video_crt_switch.c @@ -93,8 +93,8 @@ static void crt_screen_setup_aspect(unsigned width, unsigned height) { /* detect menu only */ if (width < 1920) - width = 640; - height = 480; + width = 704; + height = 480; crt_aspect_ratio_switch(width, height); }