From cdc6455a79ae51c7bd6c8f73fa8e3c26d60e0321 Mon Sep 17 00:00:00 2001 From: Quentin Decaunes Date: Tue, 12 Mar 2019 20:04:02 +0100 Subject: [PATCH] Fixed platform detection. --- js/app.js | 2 +- js/methods.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/app.js b/js/app.js index cdd761b..86842ba 100644 --- a/js/app.js +++ b/js/app.js @@ -9,7 +9,7 @@ ready(function(){ displayVersion(); reApplyPeriodically(require('electron-settings').get('settings.reapply_periodically')); displayOptionDescription(); - if (require('os').platform === 'win32') { + if (require('os').platform() === 'win32') { recreateShortcut(); } updatePresetList(); diff --git a/js/methods.js b/js/methods.js index 455ad78..f9c7d92 100644 --- a/js/methods.js +++ b/js/methods.js @@ -66,7 +66,7 @@ function registerRepeaterForAllInput() { * Will display a warning if not. */ function checkForAdminRights() { - if (require('os').platform !== 'win32') { + if (require('os').platform() !== 'win32') { const isRoot = process.getuid && process.getuid() === 0; if (!isRoot) { notification('danger', @@ -108,7 +108,7 @@ function notification(type, message) { function getRyzenAdjExecutablePath() { const settings = require('electron-settings'); var ryzen_adj_path = settings.get('settings.ryzen_adj_path'); - if (!ryzen_adj_path && require('os').platform === 'win32') { + if (!ryzen_adj_path && require('os').platform() === 'win32') { ryzen_adj_path = getCurrentWorkingDirectory() + "\\bin\\ryzenadj.exe"; } appendLog(`getRyzenAdjExecutablePath(): "${ryzen_adj_path}"`);