Resize app when second projector connected

This commit is contained in:
mmcwilliams 2019-02-26 16:43:14 -05:00
parent c964410f7b
commit 6622a72241
1 changed files with 11 additions and 3 deletions

View File

@ -346,16 +346,24 @@ dev.remember = function (which, device, type) {
} }
}; };
dev.ready = function (projector, camera, light) { dev.ready = function (projector, camera, light, projector_second) {
mainWindow.webContents.send('ready', { let args = {
camera, camera,
projector, projector,
light, light,
profile: mcopy.settings.profile profile: mcopy.settings.profile
}) }
if (projector_second && projector_second.arduino) {
args.projector_second = projector_second
}
mainWindow.webContents.send('ready', args)
settings.update('camera', camera) settings.update('camera', camera)
settings.update('projector', projector) settings.update('projector', projector)
settings.update('light', light) settings.update('light', light)
if (projector_second && projector_second.arduino) {
settings.update('projector_second', projector_second)
mainWindow.setSize(800, 800)
}
settings.save() settings.save()
return true return true
}; };