Permalink
Browse files

Add MINI_URHO check to disable Windows OS version detection, to help …

…with issue #1998.
  • Loading branch information...
cadaver committed Jun 27, 2017
1 parent ce98afc commit 0bdb20fd8e8614f74bd5bd8585ec3685ee8511be
Showing with 3 additions and 2 deletions.
  1. +3 −2 Source/Urho3D/Core/ProcessUtils.cpp
@@ -583,7 +583,8 @@ String GetHostName()
return String::EMPTY;
}
#if defined(_WIN32)
// Disable Windows OS version functionality when compiling mini version for Web, see https://github.com/urho3d/Urho3D/issues/1998
#if defined(_WIN32) && !defined(MINI_URHO)
typedef NTSTATUS (WINAPI *RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);
static void GetOS(RTL_OSVERSIONINFOW *r)
@@ -604,7 +605,7 @@ String GetOSVersion()
struct utsname u;
if (uname(&u) == 0)
return String(u.sysname) + " " + u.release;
#elif defined(_WIN32)
#elif defined(_WIN32) && !defined(MINI_URHO)
RTL_OSVERSIONINFOW r;
GetOS(&r);
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx

0 comments on commit 0bdb20f

Please sign in to comment.