I guess some people used the (mostly worthless) code in WidescreenHelpers
This commit is contained in:
@@ -334,6 +334,45 @@ function WideScale(AR4_3, AR16_9)
|
|||||||
return scale( SCREEN_WIDTH, 640, 854, AR4_3, AR16_9 )
|
return scale( SCREEN_WIDTH, 640, 854, AR4_3, AR16_9 )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- it turns out some people actually used this (mostly) worthless code:
|
||||||
|
AspectRatios = {
|
||||||
|
ThreeFour = 0.75, -- (576x760 at 1024x768)
|
||||||
|
OneOne = 1.0, -- 480x480 (uses Y)
|
||||||
|
FiveFour = 1.25, -- 600x480 (1280x1024 is a real use)
|
||||||
|
FourThree = 1.33333, --* 640x480
|
||||||
|
SixteenTen = 1.6, --* 720x480
|
||||||
|
SixteenNine = 1.77778, --* 853x480
|
||||||
|
EightThree = 2.66666, -- 1280x480
|
||||||
|
};
|
||||||
|
|
||||||
|
local function round(num, idp)
|
||||||
|
if idp and idp > 0 then
|
||||||
|
local mult = 10 ^ idp;
|
||||||
|
return math.floor(num * mult + 0.5) / mult;
|
||||||
|
end;
|
||||||
|
return math.floor(num + 0.5);
|
||||||
|
end
|
||||||
|
|
||||||
|
DisplayType = {
|
||||||
|
'DisplayType_Normal',
|
||||||
|
'DisplayType_WideScreen_16_9',
|
||||||
|
'DisplayType_WideScreen_16_10',
|
||||||
|
'DisplayType_WideScreen_8_3',
|
||||||
|
'DisplayType_Invalid',
|
||||||
|
};
|
||||||
|
|
||||||
|
function IsUsingWideScreen()
|
||||||
|
local curAspect = round(GetScreenAspectRatio(),5);
|
||||||
|
for k,v in pairs(AspectRatios) do
|
||||||
|
if AspectRatios[k] == curAspect then
|
||||||
|
if k == "SixteenNine" or k == "SixteenTen" then
|
||||||
|
return true;
|
||||||
|
else return false;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
-- (c) 2005-2011 Glenn Maynard, Chris Danford, SSC
|
-- (c) 2005-2011 Glenn Maynard, Chris Danford, SSC
|
||||||
-- All rights reserved.
|
-- All rights reserved.
|
||||||
--
|
--
|
||||||
|
|||||||
Reference in New Issue
Block a user