move wine check to utils [skip ci]

This commit is contained in:
m
2022-12-03 20:39:55 -06:00
parent 4029bc8a8e
commit e24c5cf8b3
7 changed files with 20 additions and 27 deletions

View File

@ -111,19 +111,6 @@ namespace arxan
}
}
bool is_wine()
{
static std::optional<bool> is_wine = {};
if (!is_wine.has_value())
{
const utils::nt::library ntdll("ntdll.dll");
is_wine = ntdll.get_proc<void*>("wine_get_version") != nullptr;
}
return is_wine.value();
}
class component final : public component_interface
{
public:

View File

@ -1,6 +0,0 @@
#pragma once
namespace arxan
{
bool is_wine();
}

View File

@ -1,11 +1,11 @@
#include <std_include.hpp>
#include "loader/component_loader.hpp"
#include "arxan.hpp"
#include "system_check.hpp"
#include "game/game.hpp"
#include <utils/nt.hpp>
#include <utils/io.hpp>
#include <utils/cryptography.hpp>
@ -69,7 +69,7 @@ namespace system_check
void verify_binary_version()
{
const auto value = *reinterpret_cast<DWORD*>(0x1337_b);
if (!arxan::is_wine())
if (!utils::nt::is_wine())
{
if (value == 0x60202B6A || value == 0xBC0E9FE)
{