Fix IsVirtualizedEnvironment()

This commit is contained in:
EnderIce2 2023-10-27 14:21:08 +03:00
parent 51ae83bcb2
commit 877f91c80f
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -147,7 +147,7 @@ bool DetectByCPUID()
bool DetectByHPET() bool DetectByHPET()
{ {
assert(PowerManager == nullptr); assert(PowerManager != nullptr);
void *acpi = PowerManager->GetACPI(); void *acpi = PowerManager->GetACPI();
if (!acpi) if (!acpi)
@ -179,8 +179,8 @@ bool IsVirtualizedEnvironment()
{ {
static bool IsVM = false; static bool IsVM = false;
static int _check = 0; static int vm_check = 0;
if (!_check++) if (vm_check++)
{ {
debug("Virtualized environment: %s", debug("Virtualized environment: %s",
IsVM ? "Yes" : "No"); IsVM ? "Yes" : "No");