Small fixes

This commit is contained in:
Natsumi
2023-04-22 00:51:03 +12:00
parent 5fc38f4e65
commit 2be1a75fcb
3 changed files with 18 additions and 7 deletions

View File

@@ -505,7 +505,13 @@ namespace VRCX
return Encoding.ASCII.GetString((byte[])data);
case RegistryValueKind.DWord:
return data;
if (data.GetType() != typeof(long))
return data;
long.TryParse(data.ToString(), out var longValue);
var bytes = BitConverter.GetBytes(longValue);
var doubleValue = BitConverter.ToDouble(bytes, 0);
return doubleValue;
}
}