Ticket #861: xinerama_override_screenwh.patch

File xinerama_override_screenwh.patch, 2.2 KB (added by olivier.jolly@…, 19 years ago)

Patch proposition to honour screenw/screenh even in xinerama

  • libvo/x11_common.c

     
    391391        }
    392392        if (screen < 0)
    393393            screen = 0;
    394         vo_screenwidth = screens[screen].width;
    395         vo_screenheight = screens[screen].height;
     394        if (vo_screenwidth_overridable)
     395            vo_screenwidth = screens[screen].width;
     396        if (vo_screenheight_overridable)
     397            vo_screenheight = screens[screen].height;
    396398        xinerama_x = screens[screen].x_org;
    397399        xinerama_y = screens[screen].y_org;
    398400
     
    455457
    456458        XF86VidModeGetModeLine(mDisplay, mScreen, &clock, &modeline);
    457459        if (!vo_screenwidth)
    458             vo_screenwidth = modeline.hdisplay;
     460        {
     461            vo_screenwidth = modeline.hdisplay;
     462            vo_screenwidth_overridable = 1;
     463        }
    459464        if (!vo_screenheight)
     465        {
    460466            vo_screenheight = modeline.vdisplay;
     467            vo_screenheight_overridable = 1;
     468        }
    461469    }
    462470#endif
    463471    {
    464472        if (!vo_screenwidth)
     473        {
    465474            vo_screenwidth = DisplayWidth(mDisplay, mScreen);
     475            vo_screenwidth_overridable = 1;
     476        }
    466477        if (!vo_screenheight)
     478        {
    467479            vo_screenheight = DisplayHeight(mDisplay, mScreen);
     480            vo_screenheight_overridable = 1;
     481        }
    468482    }
    469483    // get color depth (from root window, or the best visual):
    470484    XGetWindowAttributes(mDisplay, mRootWin, &attribs);
  • libvo/video_out.c

     
    2929int vo_depthonscreen=0;
    3030int vo_screenwidth=0;
    3131int vo_screenheight=0;
     32int vo_screenwidth_overridable=0;
     33int vo_screenheight_overridable=0;
    3234
    3335int vo_config_count=0;
    3436
  • libvo/video_out.h

     
    198198extern int vo_depthonscreen;
    199199extern int vo_screenwidth;
    200200extern int vo_screenheight;
     201extern int vo_screenwidth_overridable;
     202extern int vo_screenheight_overridable;
    201203
    202204// requested resolution/bpp:  (-x -y -bpp options)
    203205extern int vo_dx;