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