Merge branch 'OS-rework' into 'master'

Rework and document OS class

See merge request sheepitrenderfarm/client!255
This commit is contained in:
harlekin
2023-11-12 13:57:18 +00:00
5 changed files with 89 additions and 29 deletions

View File

@@ -391,7 +391,7 @@ public class Settings implements Activity {
// priority
// ui display low -> high but the actual values are reversed
// -19 is highest priority
boolean high_priority_support = os.getSupportHighPriority();
boolean high_priority_support = os.isHighPrioritySupported();
priority = new JSlider(high_priority_support ? -19 : 0, 19);
Hashtable<Integer, JLabel> labelTablePriority = new Hashtable<>();
labelTablePriority.put(high_priority_support ? -19 : 0, new JLabel("Low"));
@@ -417,7 +417,7 @@ public class Settings implements Activity {
JLabel priorityLabel = new JLabel("Priority");
priorityLabel.setToolTipText(SwingTooltips.PRIORITY.getText());
boolean showPrioritySlider = os.checkNiceAvailability();
boolean showPrioritySlider = os.isNiceAvailable();
priority.setVisible(showPrioritySlider);
priorityLabel.setVisible(showPrioritySlider);
@@ -745,7 +745,7 @@ public class Settings implements Activity {
// ui display low -> high but the actual values are reversed
// -19 is highest priority
OS os = OS.getOS();
boolean high_priority_support = os.getSupportHighPriority();
boolean high_priority_support = os.isHighPrioritySupported();
if (high_priority_support) {
// inverse
config.setPriority(-1 * priority.getValue());