2 * Copyright (C) 2005-2013 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
24 #include "utils/StdString.h"
26 typedef int DisplayMode;
27 #define DM_WINDOWED -1
28 #define DM_FULLSCREEN1 0
29 #define DM_FULLSCREEN2 1
38 RES_HDTV_1080pSBS = 3,
41 RES_HDTV_480p_4x3 = 6,
42 RES_HDTV_480p_16x9 = 7,
51 RES_DESKTOP = 16, // Desktop resolution for primary screen
52 RES_CUSTOM = 16 + 1, // Desktop resolution for screen #2
54 // 12 + N - 1 // Desktop resolution for screen N
55 // 12 + N // First additional resolution, in a N screen configuration.
56 // 12 + N + ... // Other resolutions, in any order
75 left = top = right = bottom = 0;
77 OVERSCAN(const OVERSCAN& os)
79 left = os.left; top = os.top;
80 right = os.right; bottom = os.bottom;
84 struct RESOLUTION_INFO
91 int iBlanking; /**< number of pixels of padding between stereoscopic frames */
102 RESOLUTION_INFO(int width = 1280, int height = 720, float aspect = 0, const CStdString &mode = "")
107 iScreenWidth = width;
108 iScreenHeight = height;
109 fPixelRatio = aspect ? ((float)width)/height / aspect : 1.0f;
113 dwFlags = iSubtitles = iScreen = 0;
115 float DisplayRatio() const
117 return iWidth * fPixelRatio / iHeight;
119 RESOLUTION_INFO(const RESOLUTION_INFO& res)
121 Overscan = res.Overscan; bFullScreen = res.bFullScreen;
122 iScreen = res.iScreen; iWidth = res.iWidth; iHeight = res.iHeight;
123 iScreenWidth = res.iScreenWidth; iScreenHeight = res.iScreenHeight;
124 iSubtitles = res.iSubtitles; dwFlags = res.dwFlags;
125 fPixelRatio = res.fPixelRatio; fRefreshRate = res.fRefreshRate;
126 strMode = res.strMode; strOutput = res.strOutput; strId = res.strId;
127 iBlanking = res.iBlanking;