-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.lua
More file actions
executable file
·72 lines (60 loc) · 2.13 KB
/
config.lua
File metadata and controls
executable file
·72 lines (60 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
-- Dynamic assignment of the working resolution, based on a fixed SCREENWIDTH.
local simulatorDpis = { ["Droid"] = 265,
["Nexus One"] = 254,
["Sensation"] = 256,
["Galaxy Tab"] = 170,
["GT-I9300"] = 306,
["Kindle Fire"] = 169,
["KFTT"] = 216,
["KFJWI"] = 254,
["BNRV200"] = 170
}
SCREENWIDTH = 320
local screenHeight = display.pixelHeight * SCREENWIDTH / display.pixelWidth
local model = system.getInfo( "model" )
local androidDisplayApproximateDpi = system.getInfo("androidDisplayApproximateDpi") or simulatorDpis[ model ]
print(system.getInfo("androidDisplayWidthInInches"))
if system.getInfo("model") == "iPad" or system.getInfo("model") == "iPad Simulator" then
SCREENWIDTH = 768
screenHeight = display.pixelHeight * SCREENWIDTH / display.pixelWidth
elseif androidDisplayApproximateDpi ~= nil then
local widthInInches = display.pixelWidth / androidDisplayApproximateDpi
local heightInInches = display.pixelHeight / androidDisplayApproximateDpi
screenInches = math.sqrt(widthInInches * widthInInches + heightInInches * heightInInches)
if screenInches >= 6 and screenInches < 8 then
SCREENWIDTH = 520
screenHeight = display.pixelHeight * SCREENWIDTH / display.pixelWidth
elseif screenInches >= 8 then
SCREENWIDTH = 768
screenHeight = display.pixelHeight * SCREENWIDTH / display.pixelWidth
end
end
application =
{
content =
{
width = SCREENWIDTH,
height = screenHeight,
fps = 60,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
notification =
{
iphone = {
types = {
"badge", "sound", "alert"
}
},
google = {
projectNumber = "000000000000"
}
},
launchPad = false
}