Browse Source

--- Merging r31143 into '.':
U packages/rtl-console/src/amicommon/video.pp
--- Recording mergeinfo for merge of r31143 into '.':
U .
--- Merging r31151 into '.':
U rtl/aros/i386/execd.inc
U rtl/amiga/m68k/execd.inc
U rtl/amiga/powerpc/execd.inc
--- Recording mergeinfo for merge of r31151 into '.':
G .

# revisions: 31143,31151

git-svn-id: branches/fixes_3_0@31152 -

marco 10 years ago
parent
commit
c4198c2917

+ 29 - 20
packages/rtl-console/src/amicommon/video.pp

@@ -96,9 +96,7 @@ var
   WindowForReqSave: PWindow;
   Process: PProcess;
 
-{$IFNDEF AROS}
   FontBitmap: PBitmap;
-{$ENDIF}
 (*
   GetScreen: pScreen;
 
@@ -227,6 +225,7 @@ var
   Counter,
   Counter2: LongInt;
   P: PWord;
+  flags: DWord;
 begin
 {$IFDEF MORPHOS}
   InitGraphicsLibrary;
@@ -293,26 +292,39 @@ begin
      {$endif}
    end;
 
-{$IFNDEF AROS}
    { Obtain Friend bitmap for font blitting }
    FontBitmap:=AllocBitMap(16,16*256,1,0,VideoWindow^.RPort^.Bitmap);
 
-   { We need to make the data word wide, otherwise the blit will fail
-     miserably on classics (tested on 3.1 + AGA) }
-   if FontBitmap <> nil then
+   if (FontBitmap <> nil) then
    begin
-     { Locking the bitmap would be better, but that requires CGFX/P96/etc specific calls }
-     Forbid();
-     p:=PWord(FontBitmap^.Planes[0]);
-     for counter:=0 to 255 do
-       for counter2:=0 to 15 do
+     flags:=GetBitmapAttr(FontBitmap,BMA_FLAGS);
+     if (Flags and BMF_STANDARD) > 0 then
+     begin
+       {$ifdef VIDEODEBUG}
+       writeln('Using fontbitmap mode.');
+       {$endif}
+       { Locking the bitmap would be better, but that requires CGFX/P96/etc specific calls }
+       Forbid();
+       { We need to make the data word wide, otherwise the blit will fail
+         miserably on classics (tested on 3.1 + AGA) }
+       p:=PWord(FontBitmap^.Planes[0]);
+       for counter:=0 to 255 do
+         for counter2:=0 to 15 do
          begin
            p^:=vgafont[counter,counter2] shl 8;
            inc(p);
          end;
-     Permit();
+       Permit();
+     end
+     else
+     begin
+       {$ifdef VIDEODEBUG}
+       writeln('Using direct-from-fontdata mode.');
+       {$endif}
+       FreeBitmap(FontBitmap);
+       FontBitmap:=nil;
+     end;
    end;
-{$ENDIF}
 
    CursorX := 0;
    CursorY := 0;
@@ -356,9 +368,7 @@ begin
     VideoWindow := nil;
   end;
 
-{$IFNDEF AROS}
   FreeBitMap(FontBitmap);
-{$ENDIF}
 
   {$ifdef WITHBUFFERING}
   FreeBitmap(BufRp^.Bitmap);
@@ -439,11 +449,10 @@ begin
     SetABPenDrMd(rp, VideoPens[tmpBGColor], VideoPens[tmpFGColor], JAM2);
   end;
 
-{$IFNDEF AROS}
-  BltTemplate(@(PWord(FontBitmap^.Planes[0])[tmpChar * 16]), 0, 2, rp, sX, sY, 8, 16);
-{$ELSE}
-  BltTemplate(@Vgafont[tmpChar, 0], 0, 1, rp, sX, sY, 8, 16);
-{$ENDIF}
+  if FontBitmap <> nil then
+    BltTemplate(@(PWord(FontBitmap^.Planes[0])[tmpChar * 16]), 0, 2, rp, sX, sY, 8, 16)
+  else
+    BltTemplate(@Vgafont[tmpChar, 0], 0, 1, rp, sX, sY, 8, 16);
 
   if crType = crUnderLine then
   begin

+ 2 - 2
rtl/amiga/m68k/execd.inc

@@ -489,7 +489,7 @@ type
   TMemEntry = packed record
     me_Un: packed record
     case Byte of
-      0 : (meu_Regs: DWord);
+      0 : (meu_Reqs: DWord);
       1 : (meu_Addr: Pointer)
     end;
     me_Length: DWord;
@@ -500,7 +500,7 @@ type
   TMemList = packed record
     ml_Node      : TNode;
     ml_NumEntries: Word;
-    ml_ME        : PMemEntry;
+    ml_ME        : array [0..0] of TMemEntry;
   end;
 
 

+ 2 - 2
rtl/amiga/powerpc/execd.inc

@@ -494,7 +494,7 @@ type
   TMemEntry = packed record
     me_Un: packed record
     case Byte of
-      0 : (meu_Regs: DWord);
+      0 : (meu_Reqs: DWord);
       1 : (meu_Addr: Pointer)
     end;
     me_Length: DWord;
@@ -505,7 +505,7 @@ type
   TMemList = packed record
     ml_Node      : TNode;
     ml_NumEntries: Word;
-    ml_ME        : PMemEntry;
+    ml_ME        : array [0..0] of TMemEntry;
   end;
 
 

+ 2 - 2
rtl/aros/i386/execd.inc

@@ -506,7 +506,7 @@ type  // Checked OK 05.08.2011 ALB
   TMemEntry = record
     me_Un: record
     case Byte of
-      0 : (meu_Regs: DWord);
+      0 : (meu_Reqs: DWord);
       1 : (meu_Addr: Pointer)
     end;
     me_Length: DWord;
@@ -517,7 +517,7 @@ type  // Checked OK 05.08.2011 ALB
   TMemList = record
     ml_Node      : TNode;
     ml_NumEntries: Word;
-    ml_ME        : PMemEntry;
+    ml_ME        : array [0..0] of TMemEntry;
   end;