Fix: -compute-method not set when configuration file present (#268)
This commit is contained in:
@@ -361,9 +361,15 @@ public class SettingsLoader {
|
||||
config.setUsePriority(priority);
|
||||
}
|
||||
try {
|
||||
if ((config.getComputeMethod() == null && computeMethod != null) || (computeMethod != null && config.getComputeMethod() != ComputeType
|
||||
if (config.getComputeMethod() == null && computeMethod == null) {
|
||||
config.setComputeMethod(ComputeType.CPU);
|
||||
}
|
||||
else if ((config.getComputeMethod() == null && computeMethod != null) || (computeMethod != null && config.getComputeMethod() != ComputeType
|
||||
.valueOf(computeMethod))) {
|
||||
config.setComputeMethod(ComputeType.valueOf(computeMethod));
|
||||
if (config.getComputeMethod() == null) {
|
||||
config.setComputeMethod(ComputeType.valueOf(computeMethod));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
|
||||
Reference in New Issue
Block a user