This merge required fixing a problem in driver.love: load_settings now only triggers when a settings file is present. It seems like better practice to perform business logic within on.initialize. on.load_settings should only be initializing globals.
E6LI4DSVQTJOWXBPO4JIZ2FUSIJFCXQFK3TRRYGAE6SY46O24LKQC Settings = {}
App_name = load_manifest()print('app name', App_name)love.window.setTitle('driver.love - '..App_name)-- backstop any default settings for this app, and stash everything to a global for on.save_settingsif settings == nil thenSettings = {}elseSettings = settingsendif Settings[App_name] == nil thenSettings[App_name] = {}Settings[App_name].viewport = ViewportSettings[App_name].definitions = get_default_map()endViewport = Settings[App_name].viewportDefinitions = Settings[App_name].definitionslocal names = {}for name, _ in pairs(Definitions) dotable.insert(names, name)endlocal defs = get_multiple_definitions_from_app(names)for name, def_editor in pairs(Definitions) doif def_editor.type == nil thendef_editor.type = 'text'endif def_editor.bg == nil thendef_editor.bg = definition_background_color(name)endif def_editor.width == nil thendef_editor.width = 600endif defs[name] thendef_editor.data = load_from_iterator(defs[name]:gmatch("[^\r\n]+"))else-- app doesn't know about this definition-- just delete it from the driver for nowprint('deleting', name)Definitions[name] = nilendendend
Settings = settingsend
App_name = load_manifest()print('app name', App_name)love.window.setTitle('driver.love - '..App_name)-- backstop any default settings for this app, and stash everything to a global for on.save_settingsif Settings[App_name] == nil thenSettings[App_name] = {}Settings[App_name].viewport = ViewportSettings[App_name].definitions = get_default_map()endViewport = Settings[App_name].viewportDefinitions = Settings[App_name].definitionslocal names = {}for name, _ in pairs(Definitions) dotable.insert(names, name)endlocal defs = get_multiple_definitions_from_app(names)for name, def_editor in pairs(Definitions) doif def_editor.type == nil thendef_editor.type = 'text'endif def_editor.bg == nil thendef_editor.bg = definition_background_color(name)endif def_editor.width == nil thendef_editor.width = 600endif defs[name] thendef_editor.data = load_from_iterator(defs[name]:gmatch("[^\r\n]+"))else-- app doesn't know about this definition-- just delete it from the driver for nowprint('deleting', name)Definitions[name] = nilendend