From ebac0ec77f567cf0d6b12014b8b677f11a491c6b Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Thu, 18 Aug 2011 13:29:34 -0500 Subject: [PATCH] cleanup and additions to WidescreenHelpers --- .../Scripts/04 WidescreenHelpers.lua | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Themes/_fallback/Scripts/04 WidescreenHelpers.lua b/Themes/_fallback/Scripts/04 WidescreenHelpers.lua index 5d15401ff1..e0b50b7266 100644 --- a/Themes/_fallback/Scripts/04 WidescreenHelpers.lua +++ b/Themes/_fallback/Scripts/04 WidescreenHelpers.lua @@ -1,19 +1,20 @@ --- supported aspect ratios; some of which I will ignore --- only really pay attention to any ratio marked with a star; --- I don't think anyone uses 3:4, 1:1, or 8:3. --- (Archer added 5:4 later and I didn't account for it yet.) +-- supported aspect ratios AspectRatios = { - ThreeFour = 0.75, -- (576x760 at 1024x768) - OneOne = 1.0, -- 480x480 (uses Y) + ThreeFour = 0.75, -- (576x760 at 1024x768; meant for rotated monitors?) + OneOne = 1.0, -- 480x480 (uses Y value of specified resolution) FiveFour = 1.25, -- 600x480 (1280x1024 is a real use case) - FourThree = 1.33333, --* 640x480 - SixteenTen = 1.6, --* 720x480 - SixteenNine = 1.77778, --* 853x480 - EightThree = 2.66666 -- 1280x480 + FourThree = 1.33333, -- 640x480 (common) + SixteenTen = 1.6, -- 720x480 (common) + SixteenNine = 1.77778, -- 853x480 (common) + EightThree = 2.66666 -- 1280x480 (two monitors) } function IsUsingWideScreen() - return GetScreenAspectRatio() >= 1.6 + return GetScreenAspectRatio() >= AspectRatios.SixteenTen +end + +function IsUsingTwoScreens() + return GetScreenAspectRatio() == AspectRatios.EightThree end -- take and use it as you like, I don't care -aj