Browse Source

* Pascal version for asm code in video (Mantis 15700)

git-svn-id: trunk@14901 -
marco 15 years ago
parent
commit
ef4954f8d9
1 changed files with 13 additions and 2 deletions
  1. 13 2
      rtl/win/video.pp

+ 13 - 2
rtl/win/video.pp

@@ -551,6 +551,8 @@ var
    ColCounter  : Longint;
    ColCounter  : Longint;
    smallforce  : boolean;
    smallforce  : boolean;
    x1,y1,x2,y2 : longint;
    x1,y1,x2,y2 : longint;
+   p1,p2,p3    : PCardinal;
+   j           : integer;
 begin
 begin
   if force then
   if force then
    smallforce:=true
    smallforce:=true
@@ -587,8 +589,17 @@ begin
         popq    %rsi
         popq    %rsi
      end;
      end;
     {$else}
     {$else}
-      {$INFO compare of videobuffers not available for this arch}
-      BREAK AND DIE
+      {$INFO No optimized version for this CPU, reverting to a pascal version}
+       j:=Videobufsize shr 2;
+       smallforce:=false;
+       p1:=pcardinal(VideoBuf);
+       p2:=pcardinal(OldVideoBuf);
+       p3:=@pcardinal(videobuf)[j];
+       while (p1<p3) and (p1^=p2^) do
+         begin
+           inc(p1); inc(p2);
+         end; 
+       smallforce:=p1<>p3;  
     {$ENDIF}
     {$ENDIF}
    {$endif}
    {$endif}
    end;
    end;