Merge pull request #6673 from alphanu1/master

Tweaks to modeline genorator
This commit is contained in:
Twinaphex 2018-05-01 13:24:40 +02:00 committed by GitHub
commit 12d72e26cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 29 deletions

View File

@ -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);
}

View File

@ -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);
}