aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-02-18 22:13:08 +0100
committer0neGal <mail@0negal.com>2022-02-18 22:14:56 +0100
commit78a83334f42294fdc0e36c2c44e1fbff7369fd7c (patch)
tree8d141f0d2d98d69a263b047122751ac7143724c8 /src/index.js
parentee7dab5b056e254bff828a9b9f6d77be2287b935 (diff)
downloadViper-78a83334f42294fdc0e36c2c44e1fbff7369fd7c.tar.gz
Viper-78a83334f42294fdc0e36c2c44e1fbff7369fd7c.zip
basic drag and drop support
Since apparently dragleave and dragenter don't quite work as intended we have to resort to this obscure method which should work just fine on the user's end.
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js
index 344ac6c..e44b549 100644
--- a/src/index.js
+++ b/src/index.js
@@ -43,6 +43,7 @@ function start() {
ipcMain.on("exit", () => {process.exit(0)})
ipcMain.on("minimize", () => {win.minimize()})
+ ipcMain.on("installfrompath", (event, path) => {utils.mods.install(path)})
ipcMain.on("installfromurl", (event, url) => {utils.mods.installFromURL(url)})
ipcMain.on("winLog", (event, ...args) => {win.webContents.send("log", ...args)});
ipcMain.on("winAlert", (event, ...args) => {win.webContents.send("alert", ...args)});
@@ -173,6 +174,7 @@ if (cli.hasArgs()) {
cli.init();
}
} else {
+ app.disableHardwareAcceleration();
app.on("ready", () => {
app.setPath("userData", path.join(app.getPath("cache"), app.name));
start();