mirror of
https://github.com/red-prig/fpPS4.git
synced 2024-10-07 03:33:20 +00:00
+
This commit is contained in:
parent
7197131e7d
commit
cf9bfd2160
@ -2126,7 +2126,7 @@ begin
|
||||
if not GFXRing.CmdBuffer.BeginRenderPass(FRenderCmd) then
|
||||
begin
|
||||
Writeln(StdErr,'!BeginRenderPass');
|
||||
Assert(false);
|
||||
Assert(false,'!BeginRenderPass');
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -334,37 +334,38 @@ end;
|
||||
|
||||
function TDirFile.getdirentries(buf:Pointer;nbytes:Int64;basep:PInt64):Int64;
|
||||
var
|
||||
i,count:DWORD;
|
||||
s,e,count:DWORD;
|
||||
begin
|
||||
count:=nbytes div SizeOf(dirent);
|
||||
if (count=0) then Exit(-EINVAL);
|
||||
|
||||
rwlock_wrlock(lock);
|
||||
i:=pos+count;
|
||||
if (i>Length(dirs)) then
|
||||
s:=pos;
|
||||
e:=s+count;
|
||||
if (e>Length(dirs)) then
|
||||
begin
|
||||
i:=Length(dirs);
|
||||
if (pos>i) then
|
||||
e:=Length(dirs);
|
||||
if (s>e) then
|
||||
begin
|
||||
count:=0;
|
||||
end else
|
||||
begin
|
||||
count:=(i-pos);
|
||||
count:=(e-s);
|
||||
end;
|
||||
end;
|
||||
|
||||
if (count<>0) then
|
||||
begin
|
||||
Move(dirs[pos],buf^,count*SizeOf(dirent));
|
||||
end;
|
||||
|
||||
pos:=i;
|
||||
pos:=e;
|
||||
rwlock_unlock(lock);
|
||||
|
||||
Writeln('getdirentries:',count,' ',i);
|
||||
if (count<>0) then
|
||||
begin
|
||||
Move(dirs[s],buf^,count*SizeOf(dirent));
|
||||
end;
|
||||
|
||||
Writeln('getdirentries:',count,' ',e);
|
||||
|
||||
if (basep<>nil) then
|
||||
begin
|
||||
basep^:=i;
|
||||
basep^:=e;
|
||||
end;
|
||||
|
||||
Result:=count*SizeOf(dirent);
|
||||
|
Loading…
Reference in New Issue
Block a user