From ed88339cb8d9944dd16fdb04fde98d9917996b89 Mon Sep 17 00:00:00 2001 From: Oj Date: Sun, 12 Dec 2021 22:22:43 +0000 Subject: [PATCH] [Index] Overlay experimenting --- src/index.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 6b70515..26f38a7 100644 --- a/src/index.js +++ b/src/index.js @@ -15,7 +15,20 @@ if (appMode === 'overlay-host') { const buildInfo = require('./utils/buildInfo'); if (buildInfo.newUpdater) { - require('./utils/u2LoadModulePath')('discord_overlay2'); + const updater = require('./updater/updater'); + + const { + NEW_UPDATE_ENDPOINT + } = require('./Constants'); + + if (!updater.tryInitUpdater(buildInfo, NEW_UPDATE_ENDPOINT)) { + throw new Error('Failed to initialize modules in overlay host.'); + } + + updater.getUpdater().startCurrentVersionSync({ + allowObsoleteHost: true + }); + // require('./utils/u2LoadModulePath')('discord_overlay2'); } else { require('./updater/moduleUpdater').initPathsOnly(buildInfo); }