Browse Source

Amicommon: Change back WindowPtr in DiskSize/DiskFree

git-svn-id: trunk@29299 -
marcus 10 years ago
parent
commit
7c42cb8b0c
2 changed files with 8 additions and 0 deletions
  1. 4 0
      rtl/amicommon/dos.pp
  2. 4 0
      rtl/amicommon/sysutils.pp

+ 4 - 0
rtl/amicommon/dos.pp

@@ -631,6 +631,8 @@ begin
       DiskSize := Int64(Inf.id_NumBlocks) * Inf.id_BytesPerBlock;
     UnLock(DirLock);
   end;
+  if OldWinPtr <> Pointer(-1) then
+    MyProc^.pr_WindowPtr := OldWinPtr;
 end;
 
 function DiskSize(Drive: Byte): Int64;
@@ -663,6 +665,8 @@ begin
       DiskFree := Int64(Inf.id_NumBlocks - Inf.id_NumBlocksUsed) * Inf.id_BytesPerBlock;
     UnLock(DirLock);
   end;
+  if OldWinPtr <> Pointer(-1) then
+    MyProc^.pr_WindowPtr := OldWinPtr;
 end;
 
 function DiskFree(Drive: Byte): Int64;

+ 4 - 0
rtl/amicommon/sysutils.pp

@@ -640,6 +640,8 @@ begin
       DiskSize := Int64(Inf.id_NumBlocks) * Inf.id_BytesPerBlock;
     UnLock(DirLock);
   end;
+  if OldWinPtr <> Pointer(-1) then
+    MyProc^.pr_WindowPtr := OldWinPtr;
 end;
 
 function DiskSize(Drive: Byte): Int64;
@@ -672,6 +674,8 @@ begin
       DiskFree := Int64(Inf.id_NumBlocks - Inf.id_NumBlocksUsed) * Inf.id_BytesPerBlock;
     UnLock(DirLock);
   end;
+  if OldWinPtr <> Pointer(-1) then
+    MyProc^.pr_WindowPtr := OldWinPtr;
 end;
 
 function DiskFree(Drive: Byte): Int64;