From 69d6fc57ff2cf57a3f8fe67e82ff8f900436c873 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 6 Apr 2010 16:29:29 +0000 Subject: change of version check and comments upgrade. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2217 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UPlatformWindows.pas | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/base/UPlatformWindows.pas') diff --git a/src/base/UPlatformWindows.pas b/src/base/UPlatformWindows.pas index cf69a359..30bad264 100644 --- a/src/base/UPlatformWindows.pas +++ b/src/base/UPlatformWindows.pas @@ -121,32 +121,31 @@ end; {** * Detects whether the game was executed locally or globally. - * - It is local if a config.ini exists in the directory of the - * executable. In config files like config.ini or score db + * - It is local if config.ini exists in the directory of the + * executable. Config files like config.ini or score db * reside in the directory of the executable. This is useful * to enable windows users to have a portable installation * e.g. on an external hdd. This is also the default behaviour * of usdx prior to version 1.1 * - It is global if no config.ini exists in the directory of the - * executable the config files are in a separate folder + * executable. The config files are in a separate folder * (e.g. %APPDATA%\ultrastardx) - * On windows resources (themes, language-files) - * reside in the directory of the executable in every case + * On windows, resources (themes, language-files) + * reside in the directory of the executable in any case * * Sets UseLocalDirs to true if the game is executed locally, false otherwise. *} procedure TPlatformWindows.DetectLocalExecution(); var LocalDir, ConfigIni: IPath; - OSVerInfo: TOSVersionInfo; begin // we just check if 'config.ini' exists in the - // directory of the executable or if windows version + // directory of the executable or if the windows version // is less than Windows Vista (major version = 6). // If so -> local execution. LocalDir := GetExecutionDir(); ConfigIni := LocalDir.Append('config.ini'); - UseLocalDirs := ((ConfigIni.IsFile and ConfigIni.Exists) and (OSVerInfo.dwMajorVersion < 6)); + UseLocalDirs := (ConfigIni.IsFile and ConfigIni.Exists and (Win32MajorVersion < 6)); end; function TPlatformWindows.GetLogPath: IPath; -- cgit v1.2.3