-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata-launcher.lua
More file actions
36 lines (36 loc) · 1.07 KB
/
data-launcher.lua
File metadata and controls
36 lines (36 loc) · 1.07 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
require("lib/TSerial")
local Enums = require("enums-launcher")
local data = {
Scaling = 2,
BootType = Enums.BootNormal,
BackgroundType = Enums.BackgroundNormal,
LastScreen = Enums.Menu,
ActiveScreen = Enums.Menu,
NextScreen = Enums.Menu,
FadeType = Enums.FadeBlack,
Volume = 1.0,
InstantPrompts = false,
InvertScrollWheel = false,
Generate = {
Output = "",
PluginTestActive = false,
PluginTest = "",
Debugging = false,
TransitionsActive = false,
Transitions = {},
MinStream = "0.2",
MaxStream = "0.4",
Clips = "20",
Width = "640",
Height = "480",
FPS = "30",
Sources = {}
}
}
local info = love.filesystem.getInfo("settings.txt")
if not info then --does not exist
love.filesystem.write("settings.txt", "{Version={Major=0,Minor=0,Patch=0}}")
end
local unpack = TSerial.unpack(love.filesystem.read("settings.txt"), true)
for k,v in pairs(unpack) do data[k] = v end --combine data and unpack tables
return data