Skip to content

Commit

Permalink
Add MINI_URHO check to disable Windows OS version detection, to help …
Browse files Browse the repository at this point in the history
…with issue #1998.
  • Loading branch information
cadaver committed Jun 27, 2017
1 parent ce98afc commit 0bdb20f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Urho3D/Core/ProcessUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 0bdb20f

Please sign in to comment.