Ticket #1911: xrandr.diff

File xrandr.diff, 2.4 KB (added by anonymous, 19 years ago)
  • mythtv/libs/libmythtv/videoout_xv.cpp

    ndex: mythtv/libs/libmythtv/videoout_xv.cpp
     
    426426        display_dim.setWidth((int) round(300 * pixel_aspect));
    427427    }
    428428
    429     // If we are using XRandR, use the aspect ratio from it instead...
    430     if (display_res)
    431         display_aspect = display_res->GetAspectRatio();
    432 
    433429    // If we are using Xinerama the display dimensions can not be trusted.
    434430    // We need to use the Xinerama monitor aspect ratio from the DB to set
    435431    // the physical screen width. This assumes the height is correct, which
     
    458454    // Now that we know the physical monitor size, we can
    459455    // calculate the display aspect ratio pretty simply...
    460456    display_aspect = ((float)display_dim.width()) / display_dim.height();
    461 
     457    // If we are using XRandR, use the aspect ratio from it instead...
     458    if (display_res)
     459        display_aspect = display_res->GetAspectRatio();
    462460    VERBOSE(VB_PLAYBACK, LOC +
    463461            QString("Estimated window dimensions: %1x%2 mm  Aspect: %3")
    464462            .arg(display_dim.width()).arg(display_dim.height())
  • mythtv/libs/libmyth/DisplayResScreen.h

     
    2626    // Gets
    2727    int Width() const { return width; }
    2828    int Height() const { return height; }
    29     int Width_mm() const { return width; }
    30     int Height_mm() const { return height; }
     29    int Width_mm() const { return width_mm; }
     30    int Height_mm() const { return height_mm; }
    3131    inline double AspectRatio() const;
    3232    inline short RefreshRate() const;
    3333    const vector<short>& RefreshRates() const { return refreshRates; }
  • mythtv/libs/libmyth/DisplayResScreen.cpp

     
    5252    if (a>0.0)
    5353        aspect = a;
    5454    else if (Height())
    55         aspect = ((double)(Width())) / ((double)(Height()));
     55        aspect = ((double)(Width_mm())) / ((double)(Height_mm()));
    5656}
    5757
    5858QString DisplayResScreen::toString() const