[mythtv] [PATCH] Potential display aspect ratio patch for non-4:3

Chris Pinkham cpinkham at bc2va.org
Mon Feb 2 11:49:31 EST 2004


> > It seems like the replacement calculation I made in the code 
> > will work no matter what the aspect ratio is because it calculates
> > rather than assuming 16:9, but I'd like to for someone with a 16:9
> > screen to test (or anyone with non-16:9 screens as well).
> 
> Yea, but you're assuming square pixels, which need not be the case.
> Maybe it's better to calculate the pixel ratio from DisplaySize?
> 
> My 2 cents,
> Kenneth

So use screen resolution and pixel ratio to determine the size of the bars?

Just realized this also would have a minor effect if I ran full-screen
on my 1280x1024 desktop as well since the code would assume that's 4:3.
Haven't paid much attention before because when I'm developing I always
run in a 640x480 window, but when I installed Myth on my new laptop it
put in black bars even when I ran it in the 640x480 window.  I talked with
Isaac about this before sending my original email and fixed this for
window-ed mode by adding a check to the if statement that sets the aspect.

It was this:

if (w_mm == 0 || h_mm == 0 || usingXinerama)
        data->display_aspect = XJ_aspect;
    else
        data->display_aspect = (float)w_mm/h_mm;

and now it will be this once I commit to CVS.

if (w_mm == 0 || h_mm == 0 || usingXinerama ||
            gContext->GetNumSetting("RunFrontendInWindow",0)))
        data->display_aspect = XJ_aspect;
    else
        data->display_aspect = (float)w_mm/h_mm;


That fixes it for running in windowed mode, but it would be nice to be able
to run full-screen occasionally also. :)
-- 

Chris



More information about the mythtv-dev mailing list