aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/UCommandLine.pas
diff options
context:
space:
mode:
authors_alexander <s_alexander@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-11-09 00:27:55 +0000
committers_alexander <s_alexander@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-11-09 00:27:55 +0000
commit917901e8e33438c425aef50a0a7417f32d77b760 (patch)
tree95f081dd0d9a206bba3bd9c0a70e7a9a4cddafc8 /src/base/UCommandLine.pas
parent474452a88427e6ea83d6435b117e5deb1d4cd0c6 (diff)
downloadusdx-917901e8e33438c425aef50a0a7417f32d77b760.tar.gz
usdx-917901e8e33438c425aef50a0a7417f32d77b760.tar.xz
usdx-917901e8e33438c425aef50a0a7417f32d77b760.zip
merged unicode branch (r1931) into trunk
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1939 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base/UCommandLine.pas')
-rw-r--r--src/base/UCommandLine.pas25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/base/UCommandLine.pas b/src/base/UCommandLine.pas
index 281a480d..ac0db2c2 100644
--- a/src/base/UCommandLine.pas
+++ b/src/base/UCommandLine.pas
@@ -33,6 +33,9 @@ interface
{$I switches.inc}
+uses
+ UPath;
+
type
TScreenMode = (scmDefault, scmFullscreen, scmWindowed);
@@ -64,9 +67,9 @@ type
Screens: integer;
// some strings set when reading infos {Length=0: Not Set}
- SongPath: string;
- ConfigFile: string;
- ScoreFile: string;
+ SongPath: IPath;
+ ConfigFile: IPath;
+ ScoreFile: IPath;
// pseudo integer values
property Language: integer read GetLanguage;
@@ -144,9 +147,9 @@ begin
Screens := -1;
// some strings set when reading infos {Length=0 Not Set}
- SongPath := '';
- ConfigFile := '';
- ScoreFile := '';
+ SongPath := PATH_NONE;
+ ConfigFile := PATH_NONE;
+ ScoreFile := PATH_NONE;
end;
{**
@@ -248,7 +251,7 @@ begin
if (PCount > I) then
begin
// write value to string
- SongPath := ParamStr(I + 1);
+ SongPath := Path(ParamStr(I + 1));
end;
end
@@ -258,11 +261,11 @@ begin
if (PCount > I) then
begin
// write value to string
- ConfigFile := ParamStr(I + 1);
+ ConfigFile := Path(ParamStr(I + 1));
// is this a relative path -> then add gamepath
- if Not ((Length(ConfigFile) > 2) AND (ConfigFile[2] = ':')) then
- ConfigFile := ExtractFilePath(ParamStr(0)) + Configfile;
+ if (not ConfigFile.IsAbsolute) then
+ ConfigFile := Platform.GetExecutionDir().Append(ConfigFile);
end;
end
@@ -272,7 +275,7 @@ begin
if (PCount > I) then
begin
// write value to string
- ScoreFile := ParamStr(I + 1);
+ ScoreFile := Path(ParamStr(I + 1));
end;
end;