blob: 2b196f0d898f7f62332c8fc62621d2c6c20f2111 [file] [log] [blame] [raw]
local function onComponentAvailable(_, componentType)
if (componentType == "screen" and component.isAvailable("gpu")) or
(componentType == "gpu" and component.isAvailable("screen"))
then
local gpu = component.primary("gpu")
gpu.bind(component.primary("screen").address)
local maxX, maxY = gpu.maxResolution()
gpu.setResolution(maxX, maxY)
end
end
return function()
event.listen("component_available", onComponentAvailable)
end