mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 10:03:28 +07:00
Fixed platform detection.
This commit is contained in:
parent
7ec6cb2032
commit
cdc6455a79
@ -9,7 +9,7 @@ ready(function(){
|
|||||||
displayVersion();
|
displayVersion();
|
||||||
reApplyPeriodically(require('electron-settings').get('settings.reapply_periodically'));
|
reApplyPeriodically(require('electron-settings').get('settings.reapply_periodically'));
|
||||||
displayOptionDescription();
|
displayOptionDescription();
|
||||||
if (require('os').platform === 'win32') {
|
if (require('os').platform() === 'win32') {
|
||||||
recreateShortcut();
|
recreateShortcut();
|
||||||
}
|
}
|
||||||
updatePresetList();
|
updatePresetList();
|
||||||
|
@ -66,7 +66,7 @@ function registerRepeaterForAllInput() {
|
|||||||
* Will display a warning if not.
|
* Will display a warning if not.
|
||||||
*/
|
*/
|
||||||
function checkForAdminRights() {
|
function checkForAdminRights() {
|
||||||
if (require('os').platform !== 'win32') {
|
if (require('os').platform() !== 'win32') {
|
||||||
const isRoot = process.getuid && process.getuid() === 0;
|
const isRoot = process.getuid && process.getuid() === 0;
|
||||||
if (!isRoot) {
|
if (!isRoot) {
|
||||||
notification('danger',
|
notification('danger',
|
||||||
@ -108,7 +108,7 @@ function notification(type, message) {
|
|||||||
function getRyzenAdjExecutablePath() {
|
function getRyzenAdjExecutablePath() {
|
||||||
const settings = require('electron-settings');
|
const settings = require('electron-settings');
|
||||||
var ryzen_adj_path = settings.get('settings.ryzen_adj_path');
|
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";
|
ryzen_adj_path = getCurrentWorkingDirectory() + "\\bin\\ryzenadj.exe";
|
||||||
}
|
}
|
||||||
appendLog(`getRyzenAdjExecutablePath(): "${ryzen_adj_path}"`);
|
appendLog(`getRyzenAdjExecutablePath(): "${ryzen_adj_path}"`);
|
||||||
|
Loading…
Reference in New Issue
Block a user