Improvement: check if the OS and the GPU are supported by the application
This commit is contained in:
@@ -29,7 +29,9 @@ import java.util.Calendar;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.sheepit.client.hardware.cpu.CPU;
|
||||
import com.sheepit.client.hardware.gpu.GPUDevice;
|
||||
import com.sheepit.client.os.OS;
|
||||
|
||||
public class Configuration {
|
||||
public enum ComputeType {
|
||||
@@ -277,4 +279,17 @@ public class Configuration {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public boolean checkOSisSupported() {
|
||||
return OS.getOS() != null;
|
||||
}
|
||||
|
||||
public boolean checkCPUisSUpported() {
|
||||
OS os = OS.getOS();
|
||||
if (os != null) {
|
||||
CPU cpu = os.getCPU();
|
||||
return cpu != null && cpu.haveData();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user