mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 18:13:28 +07:00
Fixed platform detection.
This commit is contained in:
parent
7ec6cb2032
commit
cdc6455a79
@ -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();
|
||||
|
@ -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}"`);
|
||||
|
Loading…
Reference in New Issue
Block a user