forked from NG-SD-Plugins/PowerTools
Fix slider out-of-order jumping by removing extra set_value()s
This commit is contained in:
parent
66f367e1d2
commit
d79ab91a04
3 changed files with 57 additions and 57 deletions
|
@ -380,8 +380,8 @@ packages:
|
||||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001456
|
caniuse-lite: 1.0.30001457
|
||||||
electron-to-chromium: 1.4.302
|
electron-to-chromium: 1.4.303
|
||||||
node-releases: 2.0.10
|
node-releases: 2.0.10
|
||||||
update-browserslist-db: 1.0.10_browserslist@4.21.5
|
update-browserslist-db: 1.0.10_browserslist@4.21.5
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -395,8 +395,8 @@ packages:
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/caniuse-lite/1.0.30001456:
|
/caniuse-lite/1.0.30001457:
|
||||||
resolution: {integrity: sha512-XFHJY5dUgmpMV25UqaD4kVq2LsiaU5rS8fb0f17pCoXQiQslzmFgnfOxfvo1bTpTqf7dwG/N/05CnLCnOEKmzA==}
|
resolution: {integrity: sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/chrome-trace-event/1.0.3:
|
/chrome-trace-event/1.0.3:
|
||||||
|
@ -429,8 +429,8 @@ packages:
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/electron-to-chromium/1.4.302:
|
/electron-to-chromium/1.4.303:
|
||||||
resolution: {integrity: sha512-Uk7C+7aPBryUR1Fwvk9VmipBcN9fVsqBO57jV2ZjTm+IZ6BMNqu7EDVEg2HxCNufk6QcWlFsBkhQyQroB2VWKw==}
|
resolution: {integrity: sha512-XaqiQhVsGO5ymf/Lg6XEGpv2h8b5AFqQDQ9fQckolNP2VtD2VL1pn1TIx1SSYsf0srfXVi2Sm7n/K3slJSX3ig==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/enhanced-resolve/5.12.0:
|
/enhanced-resolve/5.12.0:
|
||||||
|
|
|
@ -175,9 +175,9 @@ export class Cpus extends Component<backend.IdcProps, CpuState> {
|
||||||
set_value(CLOCK_MIN_CPU, freq);
|
set_value(CLOCK_MIN_CPU, freq);
|
||||||
for (let i = 0; i < total_cpus; i++) {
|
for (let i = 0; i < total_cpus; i++) {
|
||||||
backend.resolve(backend.setCpuClockLimits(i, freq, get_value(CLOCK_MAX_CPU)),
|
backend.resolve(backend.setCpuClockLimits(i, freq, get_value(CLOCK_MAX_CPU)),
|
||||||
(limits: number[]) => {
|
(_limits: number[]) => {
|
||||||
set_value(CLOCK_MIN_CPU, limits[0]);
|
//set_value(CLOCK_MIN_CPU, limits[0]);
|
||||||
set_value(CLOCK_MAX_CPU, limits[1]);
|
//set_value(CLOCK_MAX_CPU, limits[1]);
|
||||||
syncPlebClockToAdvanced();
|
syncPlebClockToAdvanced();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -206,9 +206,9 @@ export class Cpus extends Component<backend.IdcProps, CpuState> {
|
||||||
set_value(CLOCK_MAX_CPU, freq);
|
set_value(CLOCK_MAX_CPU, freq);
|
||||||
for (let i = 0; i < total_cpus; i++) {
|
for (let i = 0; i < total_cpus; i++) {
|
||||||
backend.resolve(backend.setCpuClockLimits(i, get_value(CLOCK_MIN_CPU), freq),
|
backend.resolve(backend.setCpuClockLimits(i, get_value(CLOCK_MIN_CPU), freq),
|
||||||
(limits: number[]) => {
|
(_limits: number[]) => {
|
||||||
set_value(CLOCK_MIN_CPU, limits[0]);
|
//set_value(CLOCK_MIN_CPU, limits[0]);
|
||||||
set_value(CLOCK_MAX_CPU, limits[1]);
|
//set_value(CLOCK_MAX_CPU, limits[1]);
|
||||||
syncPlebClockToAdvanced();
|
syncPlebClockToAdvanced();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -273,14 +273,14 @@ export class Cpus extends Component<backend.IdcProps, CpuState> {
|
||||||
onChange={(status: boolean) => {
|
onChange={(status: boolean) => {
|
||||||
backend.log(backend.LogLevel.Debug, "CPU " + advancedCpu.toString() + " is now " + status.toString());
|
backend.log(backend.LogLevel.Debug, "CPU " + advancedCpu.toString() + " is now " + status.toString());
|
||||||
if (!get_value(SMT_CPU)) {
|
if (!get_value(SMT_CPU)) {
|
||||||
backend.resolve(backend.setCpuSmt(true), (_newVal: boolean[]) => {
|
backend.resolve(backend.setCpuSmt(true), (_newVal: boolean[]) => {
|
||||||
set_value(SMT_CPU, true);
|
set_value(SMT_CPU, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
backend.resolve(backend.setCpuOnline(advancedCpuIndex, status), (newVal: boolean) => {
|
backend.resolve(backend.setCpuOnline(advancedCpuIndex, status), (newVal: boolean) => {
|
||||||
const onlines = get_value(ONLINE_STATUS_CPUS);
|
const onlines = get_value(ONLINE_STATUS_CPUS);
|
||||||
onlines[advancedCpuIndex] = newVal;
|
onlines[advancedCpuIndex] = newVal;
|
||||||
set_value(ONLINE_STATUS_CPUS, onlines);
|
set_value(ONLINE_STATUS_CPUS, onlines);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -292,24 +292,24 @@ export class Cpus extends Component<backend.IdcProps, CpuState> {
|
||||||
description={tr("Set bounds on clock speed")}
|
description={tr("Set bounds on clock speed")}
|
||||||
onChange={(value: boolean) => {
|
onChange={(value: boolean) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
const clocks = get_value(CLOCK_MIN_MAX_CPU) as MinMax[];
|
const clocks = get_value(CLOCK_MIN_MAX_CPU) as MinMax[];
|
||||||
if ((get_value(LIMITS_INFO) as backend.SettingsLimits).cpu.cpus[advancedCpuIndex].clock_min_limits != null) {
|
if ((get_value(LIMITS_INFO) as backend.SettingsLimits).cpu.cpus[advancedCpuIndex].clock_min_limits != null) {
|
||||||
clocks[advancedCpuIndex].min = (get_value(LIMITS_INFO) as backend.SettingsLimits).cpu.cpus[advancedCpuIndex].clock_min_limits!.min;
|
clocks[advancedCpuIndex].min = (get_value(LIMITS_INFO) as backend.SettingsLimits).cpu.cpus[advancedCpuIndex].clock_min_limits!.min;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((get_value(LIMITS_INFO) as backend.SettingsLimits).cpu.cpus[advancedCpuIndex].clock_max_limits != null) {
|
if ((get_value(LIMITS_INFO) as backend.SettingsLimits).cpu.cpus[advancedCpuIndex].clock_max_limits != null) {
|
||||||
clocks[advancedCpuIndex].max = (get_value(LIMITS_INFO) as backend.SettingsLimits).cpu.cpus[advancedCpuIndex].clock_max_limits!.max;
|
clocks[advancedCpuIndex].max = (get_value(LIMITS_INFO) as backend.SettingsLimits).cpu.cpus[advancedCpuIndex].clock_max_limits!.max;
|
||||||
}
|
}
|
||||||
set_value(CLOCK_MIN_MAX_CPU, clocks);
|
set_value(CLOCK_MIN_MAX_CPU, clocks);
|
||||||
reloadGUI("CPUFreqToggle");
|
reloadGUI("CPUFreqToggle");
|
||||||
} else {
|
} else {
|
||||||
const clocks = get_value(CLOCK_MIN_MAX_CPU) as MinMax[];
|
const clocks = get_value(CLOCK_MIN_MAX_CPU) as MinMax[];
|
||||||
clocks[advancedCpuIndex].min = null;
|
clocks[advancedCpuIndex].min = null;
|
||||||
clocks[advancedCpuIndex].max = null;
|
clocks[advancedCpuIndex].max = null;
|
||||||
set_value(CLOCK_MIN_MAX_CPU, clocks);
|
set_value(CLOCK_MIN_MAX_CPU, clocks);
|
||||||
backend.resolve(backend.unsetCpuClockLimits(advancedCpuIndex), (_idc: any[]) => {
|
backend.resolve(backend.unsetCpuClockLimits(advancedCpuIndex), (_idc: any[]) => {
|
||||||
reloadGUI("CPUUnsetFreq");
|
reloadGUI("CPUUnsetFreq");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -40,20 +40,20 @@ export class Gpu extends Component<backend.IdcProps> {
|
||||||
description={tr("Override APU TDP settings")}
|
description={tr("Override APU TDP settings")}
|
||||||
onChange={(value: boolean) => {
|
onChange={(value: boolean) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
if ((get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.slow_ppt_limits != null) {
|
if ((get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.slow_ppt_limits != null) {
|
||||||
set_value(SLOW_PPT_GPU, (get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.slow_ppt_limits!.max);
|
set_value(SLOW_PPT_GPU, (get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.slow_ppt_limits!.max);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.fast_ppt_limits != null) {
|
if ((get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.fast_ppt_limits != null) {
|
||||||
set_value(FAST_PPT_GPU, (get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.fast_ppt_limits!.max);
|
set_value(FAST_PPT_GPU, (get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.fast_ppt_limits!.max);
|
||||||
}
|
}
|
||||||
reloadGUI("GPUPPTToggle");
|
reloadGUI("GPUPPTToggle");
|
||||||
} else {
|
} else {
|
||||||
set_value(SLOW_PPT_GPU, null);
|
set_value(SLOW_PPT_GPU, null);
|
||||||
set_value(FAST_PPT_GPU, null);
|
set_value(FAST_PPT_GPU, null);
|
||||||
backend.resolve(backend.unsetGpuPpt(), (_: any[]) => {
|
backend.resolve(backend.unsetGpuPpt(), (_: any[]) => {
|
||||||
reloadGUI("GPUUnsetPPT");
|
reloadGUI("GPUUnsetPPT");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -113,15 +113,15 @@ export class Gpu extends Component<backend.IdcProps> {
|
||||||
description={tr("Set bounds on clock speed")}
|
description={tr("Set bounds on clock speed")}
|
||||||
onChange={(value: boolean) => {
|
onChange={(value: boolean) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
let clock_min_limits = (get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.clock_min_limits;
|
let clock_min_limits = (get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.clock_min_limits;
|
||||||
let clock_max_limits = (get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.clock_max_limits;
|
let clock_max_limits = (get_value(LIMITS_INFO) as backend.SettingsLimits).gpu.clock_max_limits;
|
||||||
if (clock_min_limits != null) {
|
if (clock_min_limits != null) {
|
||||||
set_value(CLOCK_MIN_GPU, clock_min_limits.min);
|
set_value(CLOCK_MIN_GPU, clock_min_limits.min);
|
||||||
}
|
}
|
||||||
if (clock_max_limits != null) {
|
if (clock_max_limits != null) {
|
||||||
set_value(CLOCK_MAX_GPU, clock_max_limits.max);
|
set_value(CLOCK_MAX_GPU, clock_max_limits.max);
|
||||||
}
|
}
|
||||||
reloadGUI("GPUFreqToggle");
|
reloadGUI("GPUFreqToggle");
|
||||||
} else {
|
} else {
|
||||||
set_value(CLOCK_MIN_GPU, null);
|
set_value(CLOCK_MIN_GPU, null);
|
||||||
set_value(CLOCK_MAX_GPU, null);
|
set_value(CLOCK_MAX_GPU, null);
|
||||||
|
@ -187,8 +187,8 @@ export class Gpu extends Component<backend.IdcProps> {
|
||||||
description={tr("Force RAM into low-power mode")}
|
description={tr("Force RAM into low-power mode")}
|
||||||
onChange={(value: boolean) => {
|
onChange={(value: boolean) => {
|
||||||
backend.resolve(backend.setGpuSlowMemory(value), (val: boolean) => {
|
backend.resolve(backend.setGpuSlowMemory(value), (val: boolean) => {
|
||||||
set_value(SLOW_MEMORY_GPU, val);
|
set_value(SLOW_MEMORY_GPU, val);
|
||||||
reloadGUI("GPUSlowMemory");
|
reloadGUI("GPUSlowMemory");
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue