Improvement: check if the OS and the GPU are supported by the application

This commit is contained in:
Laurent Clouet
2014-12-17 21:47:31 +00:00
parent b4d64bb754
commit ea7997c625
4 changed files with 37 additions and 1 deletions

View File

@@ -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;
}
}