Hopefully there won't be too many others.
46ASCE5K5QRO6BZNJPW4CJZCRVVG76S3GENIBGNGB352CP3DLDCQC
function initialize_window_geometry()
-- maximize window
love.window.setMode(0, 0) -- maximize
App.screen.width, App.screen.height, App.screen.flags = love.window.getMode()
-- shrink slightly to account for window decoration
App.screen.width = App.screen.width-100
App.screen.height = App.screen.height-100
function initialize_window_geometry(geometry_spec)
local geometry_initialized
if geometry_spec then
geometry_initialized = parse_geometry_spec(geometry_spec)
end
if not geometry_initialized then
-- maximize window
love.window.setMode(0, 0) -- maximize
App.screen.width, App.screen.height, App.screen.flags = love.window.getMode()
-- shrink slightly to account for window decoration
App.screen.width = App.screen.width-100
App.screen.height = App.screen.height-100
end
end
function parse_geometry_spec(geometry_spec)
local width, height, x, y = geometry_spec:match('(%d+)x(%d+)%+(%d+)%+(%d+)')
if width == nil then
print('invalid geometry spec: '..geometry_spec)
print('expected format: {width}x{height}+{x}+{y}')
return false
end
App.screen.width = math.floor(tonumber(width))
App.screen.height = math.floor(tonumber(height))
App.screen.flags = {x=math.floor(tonumber(x)), y=math.floor(tonumber(y))}
return true