MCPcopy Create free account
hub / github.com/DFHack/dfhack / is_running_on_wine

Function is_running_on_wine

package/launchdf.cpp:25–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23#ifdef WIN32
24
25static BOOL is_running_on_wine() {
26 typedef const char* (CDECL wine_get_version)(void);
27 static wine_get_version* pwine_get_version;
28 HMODULE hntdll = GetModuleHandle("ntdll.dll");
29 if(!hntdll)
30 return FALSE;
31
32 pwine_get_version = (wine_get_version*) GetProcAddress(hntdll, "wine_get_version");
33 return !!pwine_get_version;
34}
35
36static LPCWSTR launch_via_steam_posix() {
37 const char* argv[] = { "/bin/sh", "-c", "\"steam -applaunch " xstr(DF_STEAM_APPID) "\"", NULL };

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected