Add wine detection
This commit is contained in:
parent
73ee55e772
commit
0eb2f07a37
@ -218,6 +218,17 @@ namespace utils::nt
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool is_wine()
|
||||
{
|
||||
static const auto has_wine_export = []() -> bool
|
||||
{
|
||||
const library ntdll("ntdll.dll");
|
||||
return ntdll.get_proc<void*>("wine_get_version");
|
||||
}();
|
||||
|
||||
return has_wine_export;
|
||||
}
|
||||
|
||||
bool is_shutdown_in_progress()
|
||||
{
|
||||
static auto* shutdown_in_progress = []
|
||||
|
@ -166,6 +166,7 @@ namespace utils::nt
|
||||
HANDLE handle_{InvalidHandle};
|
||||
};
|
||||
|
||||
bool is_wine();
|
||||
bool is_shutdown_in_progress();
|
||||
|
||||
__declspec(noreturn) void raise_hard_exception();
|
||||
|
Loading…
Reference in New Issue
Block a user