inform of already running instance

This commit is contained in:
cupcakearmy 2022-01-09 18:45:33 +01:00
parent 62a8999f47
commit 9333af5369
No known key found for this signature in database
GPG Key ID: 3235314B4D31232F

View File

@ -10,8 +10,10 @@ import { InputDevicesStatus } from './utils'
export const DEV = !app.isPackaged export const DEV = !app.isPackaged
// Enforce single instance // Enforce single instance
const isMain = app.requestSingleInstanceLock() if (!app.requestSingleInstanceLock()) {
if (!isMain) app.quit() logger.warn('Another instance is already running. Exiting.')
app.quit()
}
// Disable gpu // Disable gpu
app.disableHardwareAcceleration() app.disableHardwareAcceleration()