Использование максимально большого жесткого диска для серийника

This commit is contained in:
Gravit 2018-12-03 18:24:02 +07:00
parent 21824962b9
commit 6f4a4b60bc
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
2 changed files with 8 additions and 4 deletions

View file

@ -34,11 +34,15 @@ public String getProcessorID()
public String getHWDisk()
{
try {
HWDiskStore store = null;
long size = 0;
for (HWDiskStore s : systemInfo.getHardware().getDiskStores()) {
if (!s.getModel().contains("USB"))
return s.getSerial();
if (size < s.getSize()) {
store = s;
size = s.getSize();
}
}
return "";
return store == null ? "" : store.getSerial();
} catch (Exception e)
{
LogHelper.error(e);

View file

@ -59,7 +59,7 @@ public final class Launcher {
public static int MAJOR = 4;
public static int MINOR = 1;
public static int PATCH = 0;
public static int BUILD = 0;
public static int BUILD = 1;
public static Version.Type RELEASE = Version.Type.DEV;
@LauncherAPI