summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d2ce4c)
raw | patch | inline | side by side (parent: 2d2ce4c)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 2 Nov 2019 06:06:27 +0000 (08:06 +0200) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 2 Nov 2019 06:06:59 +0000 (08:06 +0200) |
src/game/g_main.pas | patch | blob | history | |
src/shared/utils.pas | patch | blob | history |
diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 050ee1fbea50d4e9dbc978a1f805cc21adbfd137..9fadc1beddc6e0c68f2e36ae6ecb39f3e0693985 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
function IsSep (ch: Char): Boolean;
begin
- result := (ch = '/') or (ch = '\')
+ {$IFDEF WINDOWS}
+ result := (ch = '/') or (ch = '\');
+ {$ELSE}
+ result := (ch = '/');
+ {$ENDIF}
end;
function OptimizePath (dir: AnsiString): AnsiString;
diff --git a/src/shared/utils.pas b/src/shared/utils.pas
index 14fa53b94eecb7425bbb1d8b8746eb4e412a5826..790feb7a60a4aef96629831d2801b2ea1b54a56f 100644 (file)
--- a/src/shared/utils.pas
+++ b/src/shared/utils.pas
// ////////////////////////////////////////////////////////////////////////// //
// rewrites slashes to '/'
function fixSlashes (s: AnsiString): AnsiString;
+{$IFDEF WINDOWS}
var
f: Integer;
+{$ENDIF}
begin
result := s;
+ {$IFDEF WINDOWS}
for f := 1 to length(result) do if (result[f] = '\') then result[f] := '/';
+ {$ENDIF}
end;