OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.8 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../mplayer/x11-monitor-aspect.patch
  5. # Copyright (C) 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. Set the monitor aspect automatically for X displays as done by other drivers,
  17. e.g. the OS X one. Formerly 4:3 was always assumted leading to obviously
  18. false apsect on recent 16:9 / 16:10 desktop and laptop displays.
  19. - Rene Rebe <rene@exactcode.de>
  20. --- MPlayer-1.0pre7try2/libvo/x11_common.c 2005-04-16 17:52:03.000000000 +0200
  21. +++ MPlayer-1.0pre7try2-fixed/libvo/x11_common.c 2006-02-12 19:04:15.070424750 +0100
  22. @@ -87,6 +87,8 @@
  23. static int vo_fs_flip = 0;
  24. char **vo_fstype_list;
  25. +extern float monitor_aspect;
  26. +
  27. /* if equal to 1 means that WM is a metacity (broken as hell) */
  28. int metacity_hack = 0;
  29. @@ -510,6 +512,17 @@
  30. vo_screenwidth, vo_screenheight, depth, vo_depthonscreen,
  31. dispName, mLocalDisplay ? "local" : "remote");
  32. +#ifdef HAVE_XINERAMA
  33. + if(!XineramaIsActive(mDisplay))
  34. +#endif
  35. + {
  36. + int w, h;
  37. + w = XDisplayWidthMM (mDisplay, mScreen);
  38. + h = XDisplayHeightMM (mDisplay, mScreen);
  39. + if (w && h)
  40. + monitor_aspect = (float) w / h;
  41. + }
  42. +
  43. vo_wm_type = vo_wm_detect();
  44. vo_fs_type = vo_x11_get_fs_type(vo_wm_type);