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}"`);