Speed optimization.
This commit is contained in:
parent
306400541e
commit
b7afbd4bcb
|
@ -358,18 +358,26 @@ DWORD VERSION_GetLinkedDllVersion(void)
|
||||||
*/
|
*/
|
||||||
static WINDOWS_VERSION VERSION_GetVersion(void)
|
static WINDOWS_VERSION VERSION_GetVersion(void)
|
||||||
{
|
{
|
||||||
static WORD winver = 0xffff;
|
static WORD winver = 0xffff;
|
||||||
|
|
||||||
if (versionForced) /* user has overridden any sensible checks */
|
if (winver == 0xffff) /* to be determined */
|
||||||
return defaultWinVersion;
|
{
|
||||||
|
WINDOWS_VERSION retver;
|
||||||
|
|
||||||
|
if (versionForced) /* user has overridden any sensible checks */
|
||||||
|
winver = defaultWinVersion;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retver = VERSION_GetLinkedDllVersion();
|
||||||
|
|
||||||
if (winver == 0xffff) /* to be determined */ {
|
/* cache determined value, but do not store in case of WIN31 */
|
||||||
WINDOWS_VERSION retver = VERSION_GetLinkedDllVersion();
|
if (retver != WIN31) winver = retver;
|
||||||
|
|
||||||
if (retver != WIN31) winver = retver;
|
return retver;
|
||||||
return retver;
|
|
||||||
}
|
}
|
||||||
return winver;
|
}
|
||||||
|
|
||||||
|
return winver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue