Jump to content

Clover Problems and Solutions


ErmaC
3,206 posts in this topic

Recommended Posts

still not fixed in latest clover r3726. lang is ko. r3696 is nop. r3716 and over have this issue.

post-980913-0-71977200-1472256475_thumb.png

 

also i found new gui bug. my new laptop(skylake) cant rare get gui(hold oem log, not pass oem logo)

 

i attached clover debug logo(hold oem)

 

add. r3969 clover log.

 

thanks

Link to comment
Share on other sites

Sherlocks@

I dont think is relate to clover boot file

See no issue for me with the same themes

 

 

 

 

mini_329385screenshot3.png

Yeah English is no problem. If you set lang is ko in GUI, you can see my case.

 

This problem isnt happen r3696.

 

I report difference previous clover.

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

Yeah English is no problem. If you set lang is ko in GUI, you can see my case.

 

This problem isnt happen r3696.

 

I report difference previous clover.

 

나의 LG-F410S 의 Tapatalk에서 보냄

Yes you are right I just set to  ko 

and same thing as you

Link to comment
Share on other sites

@Sherlocks Why you didnt follow my advice to not compile with GCC (mine was 4.9) with LodePNG enable? LodePNG still need review by Clover team. Try to change "egDecodePNG" in "libeg/image.c" & recompile with GCC. Please do reboot to Clover GUI multiple times to test until you are sure that randomly bad drawing disappears. I see @artur_pt & @chris1111 had same problems.

 

 

 

#if defined(LODEPNG)
EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha) {
  EG_IMAGE    *NewImage = NULL;
  EG_PIXEL    *PixelData, *Pixel, *PixelD;
  UINT32      PNG_error, Width, Height;
  INTN        i, ImageSize;

  PNG_error = lodepng_decode32((UINT8**) &PixelData, &Width, &Height, (CONST UINT8*) FileData, FileDataLength);

  if (PNG_error) {
    return NULL;
  }

  // allocate image structure and buffer
  NewImage = egCreateImage((INTN)Width, (INTN)Height, WantAlpha);
  if ((NewImage == NULL) || (NewImage->Width != (INTN)Width) || (NewImage->Height != (INTN)Height)) {
    return NULL;
  }

  ImageSize = (NewImage->Height * NewImage->Width);

  Pixel = (EG_PIXEL*)NewImage->PixelData;
  PixelD = PixelData;
  for (i = 0; i < ImageSize; i++) {
    //UINT8 Temp;
    //Temp = Pixel->b;
    //Pixel->b = Pixel->r;
    //Pixel->r = Temp;
    Pixel->b = PixelD->r; //change r <-> b
    Pixel->r = PixelD->b;
    Pixel->g = PixelD->g;
    Pixel->a = PixelD->a; // 255 is opaque, 0 - transparent
    Pixel++;
    PixelD++;
  }

  lodepng_free(PixelData);

  return NewImage;
}
#else
EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha) {
  EG_IMAGE    *NewImage;
  PNG_INFO    *info;
  EG_PIXEL    *Pixel;
  INTN        x, y;
  INT32       PNG_error;

  // read and check header
  if (FileDataLength < sizeof(BMP_IMAGE_HEADER) || FileData == NULL)
    return NULL;

  // read and check header
  PNG_error = 0;
  info = PNG_decode(FileData, (UINT32)FileDataLength);
  if (info == NULL || PNG_error) {
    //       DBG("PNG_decode == null, PNG_error=%d", PNG_error);
    return NULL;
  }

  NewImage = egCreateImage((INTN)info->width, (INTN)info->height, WantAlpha);
  if (NewImage == NULL) {
    //        DBG("egCreateImage == null");
    return NULL;
  }

  CopyMem(NewImage->PixelData, info->image->data, info->image->size);
  png_alloc_free_all();
  Pixel = (EG_PIXEL*)NewImage->PixelData;
  for (y = 0; y < NewImage->Height; y++) {
    for (x = 0; x < NewImage->Width; x++) {
      UINT8 Temp;
      Temp = Pixel->b;
      Pixel->b = Pixel->r;
      Pixel->r = Temp;
      Pixel++;
    }
  }
  //DBG("png decoded %dx%d datalenght=%d iconsize=%d\n", NewImage->Height, NewImage->Width, FileDataLength, IconSize);
  return NewImage;
}
#endif //LODEPNG

 

 

 

** remove IconSize for newer clover

EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN BOOLEAN WantAlpha) { ... }
Edited by cecekpawon
Link to comment
Share on other sites

still not fixed in latest clover r3726. lang is ko. r3696 is nop. r3716 and over have this issue.

attachicon.gifscreenshot0.png

 

also i found new gui bug. my new laptop(skylake) cant rare get gui(hold oem log, not pass oem logo)

 

i attached clover debug logo(hold oem)

 

add. r3969 clover log.

 

thanks

The debug.log is useless until you compile Clover with

#define DEBUG_TEXT 1

 in libeg/text.c

Set CharWidth in your theme to 20.

Link to comment
Share on other sites

@Sherlocks Why you didnt follow my advice to not compile with GCC (mine was 4.9) with LodePNG enable? LodePNG still need review by Clover team. Try to change "egDecodePNG" in "libeg/image.c" & recompile with GCC. Please do reboot to Clover GUI multiple times to test until you are sure that randomly bad drawing disappears. I see @artur_pt & @chris1111 had same problems.

 

 

 

#if defined(LODEPNG)
EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha) {
  EG_IMAGE    *NewImage = NULL;
  EG_PIXEL    *PixelData, *Pixel, *PixelD;
  UINT32      PNG_error, Width, Height;
  INTN        i, ImageSize;

  PNG_error = lodepng_decode32((UINT8**) &PixelData, &Width, &Height, (CONST UINT8*) FileData, FileDataLength);

  if (PNG_error) {
    return NULL;
  }

  // allocate image structure and buffer
  NewImage = egCreateImage((INTN)Width, (INTN)Height, WantAlpha);
  if ((NewImage == NULL) || (NewImage->Width != (INTN)Width) || (NewImage->Height != (INTN)Height)) {
    return NULL;
  }

  ImageSize = (NewImage->Height * NewImage->Width);

  Pixel = (EG_PIXEL*)NewImage->PixelData;
  PixelD = PixelData;
  for (i = 0; i < ImageSize; i++) {
    //UINT8 Temp;
    //Temp = Pixel->b;
    //Pixel->b = Pixel->r;
    //Pixel->r = Temp;
    Pixel->b = PixelD->r; //change r <-> b
    Pixel->r = PixelD->b;
    Pixel->g = PixelD->g;
    Pixel->a = PixelD->a; // 255 is opaque, 0 - transparent
    Pixel++;
    PixelD++;
  }

  lodepng_free(PixelData);

  return NewImage;
}
#else
EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha) {
  EG_IMAGE    *NewImage;
  PNG_INFO    *info;
  EG_PIXEL    *Pixel;
  INTN        x, y;
  INT32       PNG_error;

  // read and check header
  if (FileDataLength < sizeof(BMP_IMAGE_HEADER) || FileData == NULL)
    return NULL;

  // read and check header
  PNG_error = 0;
  info = PNG_decode(FileData, (UINT32)FileDataLength);
  if (info == NULL || PNG_error) {
    //       DBG("PNG_decode == null, PNG_error=%d", PNG_error);
    return NULL;
  }

  NewImage = egCreateImage((INTN)info->width, (INTN)info->height, WantAlpha);
  if (NewImage == NULL) {
    //        DBG("egCreateImage == null");
    return NULL;
  }

  CopyMem(NewImage->PixelData, info->image->data, info->image->size);
  png_alloc_free_all();
  Pixel = (EG_PIXEL*)NewImage->PixelData;
  for (y = 0; y < NewImage->Height; y++) {
    for (x = 0; x < NewImage->Width; x++) {
      UINT8 Temp;
      Temp = Pixel->b;
      Pixel->b = Pixel->r;
      Pixel->r = Temp;
      Pixel++;
    }
  }
  //DBG("png decoded %dx%d datalenght=%d iconsize=%d\n", NewImage->Height, NewImage->Width, FileDataLength, IconSize);
  return NewImage;
}
#endif //LODEPNG

 

 

** remove IconSize for newer clover

EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN BOOLEAN WantAlpha) { ... }
Thanks reply. I didnt compile clover.

I just use clover official package. Then test. Sorry I dont know detail.

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

@Sherlocks Why you didnt follow my advice to not compile with GCC (mine was 4.9) with LodePNG enable? LodePNG still need review by Clover team. Try to change "egDecodePNG" in "libeg/image.c" & recompile with GCC. Please do reboot to Clover GUI multiple times to test until you are sure that randomly bad drawing disappears. I see @artur_pt & @chris1111 had same problems.

 

 

 

#if defined(LODEPNG)
EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha) {
  EG_IMAGE    *NewImage = NULL;
  EG_PIXEL    *PixelData, *Pixel, *PixelD;
  UINT32      PNG_error, Width, Height;
  INTN        i, ImageSize;

  PNG_error = lodepng_decode32((UINT8**) &PixelData, &Width, &Height, (CONST UINT8*) FileData, FileDataLength);

  if (PNG_error) {
    return NULL;
  }

  // allocate image structure and buffer
  NewImage = egCreateImage((INTN)Width, (INTN)Height, WantAlpha);
  if ((NewImage == NULL) || (NewImage->Width != (INTN)Width) || (NewImage->Height != (INTN)Height)) {
    return NULL;
  }

  ImageSize = (NewImage->Height * NewImage->Width);

  Pixel = (EG_PIXEL*)NewImage->PixelData;
  PixelD = PixelData;
  for (i = 0; i < ImageSize; i++) {
    //UINT8 Temp;
    //Temp = Pixel->b;
    //Pixel->b = Pixel->r;
    //Pixel->r = Temp;
    Pixel->b = PixelD->r; //change r <-> b
    Pixel->r = PixelD->b;
    Pixel->g = PixelD->g;
    Pixel->a = PixelD->a; // 255 is opaque, 0 - transparent
    Pixel++;
    PixelD++;
  }

  lodepng_free(PixelData);

  return NewImage;
}
#else
EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha) {
  EG_IMAGE    *NewImage;
  PNG_INFO    *info;
  EG_PIXEL    *Pixel;
  INTN        x, y;
  INT32       PNG_error;

  // read and check header
  if (FileDataLength < sizeof(BMP_IMAGE_HEADER) || FileData == NULL)
    return NULL;

  // read and check header
  PNG_error = 0;
  info = PNG_decode(FileData, (UINT32)FileDataLength);
  if (info == NULL || PNG_error) {
    //       DBG("PNG_decode == null, PNG_error=%d", PNG_error);
    return NULL;
  }

  NewImage = egCreateImage((INTN)info->width, (INTN)info->height, WantAlpha);
  if (NewImage == NULL) {
    //        DBG("egCreateImage == null");
    return NULL;
  }

  CopyMem(NewImage->PixelData, info->image->data, info->image->size);
  png_alloc_free_all();
  Pixel = (EG_PIXEL*)NewImage->PixelData;
  for (y = 0; y < NewImage->Height; y++) {
    for (x = 0; x < NewImage->Width; x++) {
      UINT8 Temp;
      Temp = Pixel->b;
      Pixel->b = Pixel->r;
      Pixel->r = Temp;
      Pixel++;
    }
  }
  //DBG("png decoded %dx%d datalenght=%d iconsize=%d\n", NewImage->Height, NewImage->Width, FileDataLength, IconSize);
  return NewImage;
}
#endif //LODEPNG

 

 

** remove IconSize for newer clover

EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN BOOLEAN WantAlpha) { ... }
Really Sorry. Can you provide your follow complie clover? Because i cant compile clover.

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

The debug.log is useless until you compile Clover with

#define DEBUG_TEXT 1

 in libeg/text.c

Set CharWidth in your theme to 20.

 

here is log file(hold oem log) with #define DEBUG_TEXT 1

 

i dont know where is "Set CharWidth in your theme to 20."

 

i use bootcamp theme in clover package.

 

my laptop is hold on oem logo now in latest clover. i cant see scan_entry.

 

thanks

Link to comment
Share on other sites

 

@Sherlocks Why you didnt follow my advice to not compile with GCC (mine was 4.9) with LodePNG enable? LodePNG still need review by Clover team. Try to change "egDecodePNG" in "libeg/image.c" & recompile with GCC. Please do reboot to Clover GUI multiple times to test until you are sure that randomly bad drawing disappears. I see @artur_pt & @chris1111 had same problems.

 

 

 

#if defined(LODEPNG)
EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha) {
  EG_IMAGE    *NewImage = NULL;
  EG_PIXEL    *PixelData, *Pixel, *PixelD;
  UINT32      PNG_error, Width, Height;
  INTN        i, ImageSize;

  PNG_error = lodepng_decode32((UINT8**) &PixelData, &Width, &Height, (CONST UINT8*) FileData, FileDataLength);

  if (PNG_error) {
    return NULL;
  }

  // allocate image structure and buffer
  NewImage = egCreateImage((INTN)Width, (INTN)Height, WantAlpha);
  if ((NewImage == NULL) || (NewImage->Width != (INTN)Width) || (NewImage->Height != (INTN)Height)) {
    return NULL;
  }

  ImageSize = (NewImage->Height * NewImage->Width);

  Pixel = (EG_PIXEL*)NewImage->PixelData;
  PixelD = PixelData;
  for (i = 0; i < ImageSize; i++) {
    //UINT8 Temp;
    //Temp = Pixel->b;
    //Pixel->b = Pixel->r;
    //Pixel->r = Temp;
    Pixel->b = PixelD->r; //change r <-> b
    Pixel->r = PixelD->b;
    Pixel->g = PixelD->g;
    Pixel->a = PixelD->a; // 255 is opaque, 0 - transparent
    Pixel++;
    PixelD++;
  }

  lodepng_free(PixelData);

  return NewImage;
}
#else
EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha) {
  EG_IMAGE    *NewImage;
  PNG_INFO    *info;
  EG_PIXEL    *Pixel;
  INTN        x, y;
  INT32       PNG_error;

  // read and check header
  if (FileDataLength < sizeof(BMP_IMAGE_HEADER) || FileData == NULL)
    return NULL;

  // read and check header
  PNG_error = 0;
  info = PNG_decode(FileData, (UINT32)FileDataLength);
  if (info == NULL || PNG_error) {
    //       DBG("PNG_decode == null, PNG_error=%d", PNG_error);
    return NULL;
  }

  NewImage = egCreateImage((INTN)info->width, (INTN)info->height, WantAlpha);
  if (NewImage == NULL) {
    //        DBG("egCreateImage == null");
    return NULL;
  }

  CopyMem(NewImage->PixelData, info->image->data, info->image->size);
  png_alloc_free_all();
  Pixel = (EG_PIXEL*)NewImage->PixelData;
  for (y = 0; y < NewImage->Height; y++) {
    for (x = 0; x < NewImage->Width; x++) {
      UINT8 Temp;
      Temp = Pixel->b;
      Pixel->b = Pixel->r;
      Pixel->r = Temp;
      Pixel++;
    }
  }
  //DBG("png decoded %dx%d datalenght=%d iconsize=%d\n", NewImage->Height, NewImage->Width, FileDataLength, IconSize);
  return NewImage;
}
#endif //LODEPNG

 

 

 

** remove IconSize for newer clover

EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN BOOLEAN WantAlpha) { ... }

 

 

i builded clover blow and test. but my laptop hold oem logo.

 

 

 

 

 

//EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha) {

// EG_IMAGE *NewImage = NULL;

// EG_PIXEL *PixelData, *Pixel, *PixelD;

// UINT32 PNG_error, Width, Height;

// INTN i, ImageSize;

//

// PNG_error = lodepng_decode32((UINT8**) &PixelData, &Width, &Height, (CONST UINT8*) FileData, FileDataLength);

//

// if (PNG_error) {

// return NULL;

// }

 

// // allocate image structure and buffer

// NewImage = egCreateImage((INTN)Width, (INTN)Height, WantAlpha);

// if ((NewImage == NULL) || (NewImage->Width != (INTN)Width) || (NewImage->Height != (INTN)Height)) {

// return NULL;

// }

 

// ImageSize = (NewImage->Height * NewImage->Width);

 

// Pixel = (EG_PIXEL*)NewImage->PixelData;

// PixelD = PixelData;

// for (i = 0; i < ImageSize; i++) {

// //UINT8 Temp;

// //Temp = Pixel->b;

// //Pixel->b = Pixel->r;

// //Pixel->r = Temp;

// Pixel->b = PixelD->r; //change r <-> b

// Pixel->r = PixelD->b;

// Pixel->g = PixelD->g;

// Pixel->a = PixelD->a; // 255 is opaque, 0 - transparent

// Pixel++;

// PixelD++;

// }

//

// lodepng_free(PixelData);

 

// return NewImage;

//}

//#else

//EG_IMAGE * egDecodePNG(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha) {

// EG_IMAGE *NewImage;

// PNG_INFO *info;

// EG_PIXEL *Pixel;

// INTN x, y;

// INT32 PNG_error;

 

// read and check header

// if (FileDataLength < sizeof(BMP_IMAGE_HEADER) || FileData == NULL)

// return NULL;

 

// read and check header

// PNG_error = 0;

// info = PNG_decode(FileData, (UINT32)FileDataLength);

// if (info == NULL || PNG_error) {

// DBG("PNG_decode == null, PNG_error=%d", PNG_error);

// return NULL;

// }

 

// NewImage = egCreateImage((INTN)info->width, (INTN)info->height, WantAlpha);

// if (NewImage == NULL) {

// DBG("egCreateImage == null");

// return NULL;

// }

 

// CopyMem(NewImage->PixelData, info->image->data, info->image->size);

// png_alloc_free_all();

// Pixel = (EG_PIXEL*)NewImage->PixelData;

// for (y = 0; y < NewImage->Height; y++) {

// for (x = 0; x < NewImage->Width; x++) {

// UINT8 Temp;

// Temp = Pixel->b;

// Pixel->b = Pixel->r;

// Pixel->r = Temp;

// Pixel++;

// }

// }

// //DBG("png decoded %dx%d datalenght=%d iconsize=%d\n", NewImage->Height, NewImage->Width, FileDataLength, IconSize);

// return NewImage;

//}

 

 

 

add. okay, i use ko lang in GUI, my laptop hold oem logo, so i change ko to en, then i can get GUI

  • Like 1
Link to comment
Share on other sites

Sorry @Sherlocks

 

1. Embedded font doenst come with Korean.
2. Clover failed to load "FontKorean.png" from "EFI\CLOVER\font\" or "EFI\CLOVER\themes\<theme>\".

 

In "/Clover/rEFIt_UEFI/libeg/text.c", try to replace:

 

 

 

EG_IMAGE * egLoadFontImage(IN INTN Rows, IN INTN Cols) {
  EG_IMAGE    *NewImage = NULL, *NewFontImage;
  INTN        ImageWidth, ImageHeight, x, y, Ypos, j;
  EG_PIXEL    *PixelPtr, FirstPixel;
  BOOLEAN     isKorean = (gLanguage == korean);
  CHAR16      *fontFilePath, *commonFontDir = L"EFI\\CLOVER\\font";

  if (IsEmbeddedTheme() && !isKorean) {
    DBG("Using embedded font\n");
    goto F_EMBEDDED;
  } else {
    NewImage = egLoadImage(ThemeDir, isKorean ? L"FontKorean.png" : GlobalConfig.FontFileName, TRUE);
    DBG("Loading font from ThemeDir: %a\n", NewImage ? "Success" : "Error");
  }

  if (NewImage) {
    goto F_THEME;
  } else {
    fontFilePath = PoolPrint(L"%s\\%s", commonFontDir, isKorean ? L"FontKorean.png" : GlobalConfig.FontFileName);
    NewImage = egLoadImage(SelfRootDir, fontFilePath, TRUE);

    if (!NewImage) {
      if (!isKorean) {
        DBG("Font %s is not loaded, using embedded\n", fontFilePath);
        FreePool(fontFilePath);
        goto F_EMBEDDED;
      }
      FreePool(fontFilePath);
      return NULL;
    } else {
      DBG("font %s loaded from common font dir %s\n", GlobalConfig.FontFileName, commonFontDir);
      FreePool(fontFilePath);
      goto F_THEME;
    }
  }

F_EMBEDDED:
  //NewImage = DEC_PNG_BUILTIN(emb_font_data);
  NewImage = egDecodePNG(&emb_font_data[0], sizeof(emb_font_data), TRUE);

F_THEME:
  ImageWidth = NewImage->Width;
  //DBG("ImageWidth=%d\n", ImageWidth);
  ImageHeight = NewImage->Height;
  //DBG("ImageHeight=%d\n", ImageHeight);
  PixelPtr = NewImage->PixelData;
  DBG("Font loaded: ImageWidth=%d ImageHeight=%d\n", ImageWidth, ImageHeight);
  NewFontImage = egCreateImage(ImageWidth * Rows, ImageHeight / Rows, TRUE);

  if (NewFontImage == NULL) {
    DBG("Can't create new font image!\n");
    return NULL;
  }

  FontWidth = ImageWidth / Cols;
  FontHeight = ImageHeight / Rows;
  FirstPixel = *PixelPtr;
  for (y = 0; y < Rows; y++) {
    for (j = 0; j < FontHeight; j++) {
      Ypos = ((j * Rows) + y) * ImageWidth;
      for (x = 0; x < ImageWidth; x++) {
       if (//WantAlpha &&
           (PixelPtr->b == FirstPixel. &&
           (PixelPtr->g == FirstPixel.g) &&
           (PixelPtr->r == FirstPixel.r)
           ) {
          PixelPtr->a = 0;
        }
        NewFontImage->PixelData[Ypos + x] = *PixelPtr++;
      }
    }
  }

  egFreeImage(NewImage);

  return NewFontImage;
}

VOID PrepareFont() {
  EG_PIXEL    *p;
  INTN         Width, Height;

  if (gLanguage == korean) {
    FontImage = egLoadFontImage(10, 28);
    if (FontImage) {
      FontHeight = 16;
      GlobalConfig.CharWidth = 20;
      FontWidth = GlobalConfig.CharWidth;
      TextHeight = FontHeight + TEXT_YMARGIN * 2;
      DBG("Using Korean font matrix\n");
      return;
    } else {
      DBG("font image not loaded, use english\n");
      gLanguage = english;
    }
  }

  // load the font
  if (FontImage == NULL){
    DBG("load font image type %d\n", GlobalConfig.Font);
    FontImage = egLoadFontImage(16, 16);
  }

  if (FontImage) {
    if (GlobalConfig.Font == FONT_GRAY) {
      //invert the font. embedded is dark
      p = FontImage->PixelData;
      for (Height = 0; Height < FontImage->Height; Height++){
        for (Width = 0; Width < FontImage->Width; Width++, p++){
          p->b ^= 0xFF;
          p->g ^= 0xFF;
          p->r ^= 0xFF;
          //p->a = 0xFF;    //huh!
        }
      }
    }

    TextHeight = FontHeight + TEXT_YMARGIN * 2;
    DBG("Font %d prepared WxH=%dx%d CharWidth=%d\n", GlobalConfig.Font, FontWidth, FontHeight, GlobalConfig.CharWidth);
  } else {
    DBG("Failed to load font\n");
  }
}

 

 

Edited by cecekpawon
  • Like 1
Link to comment
Share on other sites

Anyone tried to get back to main menu when in the HELP screen by pressing the ESC key?

For me it is not working in CLOVER rev. 3728

 

so when i am in the HELP screen i have NO WAY OUT. Have to restart machine completely. Could anyone confirm this or is it just me?

In all other sections the ESC key will allways get me back to main menu.

Link to comment
Share on other sites

Anyone tried to get back to main menu when in the HELP screen by pressing the ESC key?

For me it is not working in CLOVER rev. 3728

 

so when i am in the HELP screen i have NO WAY OUT. Have to restart machine completely. Could anyone confirm this or is it just me?

In all other sections the ESC key will allways get me back to main menu.

Hello there,

 

If you mean the F1 menu, it's working here. What about the return button? isn't it there? 

Link to comment
Share on other sites

Hello there,

 

If you mean the F1 menu, it's working here. What about the return button? isn't it there? 

Whoops, it is really just me... and now i know why:

 

the screen attached to IGPU just displays as 1440x900, which is to small to display the whole content of the F1 (HELP) screen - and cause of this behavior he doesn't show the RETURN button, neither i can't get back with the ESC key. Also i am unable to pres WIN-ALT-DEL to reset the PC (yes, i have to press the physical RESET-Button!).

 

If the display resolution is high enough to show whole content, everything is well. It's weired but i don't ask, why it behaves this way. I just ignore it... let's get back to work.

 

:no:

 

Best way to describe this behavior: "It's not a bug - it's a feature"

Link to comment
Share on other sites

Whoops, it is really just me... and now i know why:

 

the screen attached to IGPU just displays as 1440x900, which is to small to display the whole content of the F1 (HELP) screen - and cause of this behavior he doesn't show the RETURN button, neither i can't get back with the ESC key. Also i am unable to pres WIN-ALT-DEL to reset the PC (yes, i have to press the physical RESET-Button!).

 

If the display resolution is high enough to show whole content, everything is well. It's weired but i don't ask, why it behaves this way. I just ignore it... let's get back to work.

 

:no:

 

Best way to describe this behavior: "It's not a bug - it's a feature"

That's strange. In fact, I tried to reproduce the issue on a display with the resolution of 1440x900. I assume there are other factors.

 

Nonetheless, the missing scrolling function will be added soon.

 

Edit: Here's a temporary solution until the new code will be released.

 

Clover was built with the following arguments.

build --skip-autogen  -D USE_LOW_EBDA -p Clover/Clover.dsc  -a X64 -b RELEASE -t XCODE5 -n 5  

Best regards.

tmpfix.zip

Edited by Needy
  • Like 1
Link to comment
Share on other sites

Hi Slice,

nasm version detection for Darwin versions improved for future releases (always >= 12.02.02) but rc ones accepted.

rc (release candidate) are only from nasm developers: http://www.nasm.us/pub/nasm/releasebuilds/

Otherwise, ebuild.sh actually skip these versions because of the 'rc' prefix in one of the component of the version string.

Example:

 

2.13 accepted

2.13rc1 accepted

2.12.03rc4 accepted

2.12.03 accepted

2.12.1 refused

2.12.1rc9 refused (anyway this is a good version because of the outmacho.c fix already present, but for rule is not >= 12.02.02)

 

also

2.12.04test1 (or any other non numerical suffix other than "rc") refused ...not from nasm devels

ebuild.sh.zip

Link to comment
Share on other sites

Edit: Here's a temporary solution until the new code will be released.

Best regards.

Yep, that did it for me. Screen now is scrollable for me and the ESC key is working again in the HELP (F1) screen. Thanx a lot...

 

BTW: i was using Classic Mac OS as Clover Theme

  • Like 1
Link to comment
Share on other sites

Sorry @Sherlocks

 

1. Embedded font doenst come with Korean.

2. Clover failed to load "FontKorean.png" from "EFI\CLOVER\font\" or "EFI\CLOVER\themes\<theme>\".

 

In "/Clover/rEFIt_UEFI/libeg/text.c", try to replace:

 

 

 

EG_IMAGE * egLoadFontImage(IN INTN Rows, IN INTN Cols) {
  EG_IMAGE    *NewImage = NULL, *NewFontImage;
  INTN        ImageWidth, ImageHeight, x, y, Ypos, j;
  EG_PIXEL    *PixelPtr, FirstPixel;
  BOOLEAN     isKorean = (gLanguage == korean);
  CHAR16      *fontFilePath, *commonFontDir = L"EFI\\CLOVER\\font";

  if (IsEmbeddedTheme() && !isKorean) {
    DBG("Using embedded font\n");
    goto F_EMBEDDED;
  } else {
    NewImage = egLoadImage(ThemeDir, isKorean ? L"FontKorean.png" : GlobalConfig.FontFileName, TRUE);
    DBG("Loading font from ThemeDir: %a\n", NewImage ? "Success" : "Error");
  }

  if (NewImage) {
    goto F_THEME;
  } else {
    fontFilePath = PoolPrint(L"%s\\%s", commonFontDir, isKorean ? L"FontKorean.png" : GlobalConfig.FontFileName);
    NewImage = egLoadImage(SelfRootDir, fontFilePath, TRUE);

    if (!NewImage) {
      if (!isKorean) {
        DBG("Font %s is not loaded, using embedded\n", fontFilePath);
        FreePool(fontFilePath);
        goto F_EMBEDDED;
      }
      FreePool(fontFilePath);
      return NULL;
    } else {
      DBG("font %s loaded from common font dir %s\n", GlobalConfig.FontFileName, commonFontDir);
      FreePool(fontFilePath);
      goto F_THEME;
    }
  }

F_EMBEDDED:
  //NewImage = DEC_PNG_BUILTIN(emb_font_data);
  NewImage = egDecodePNG(&emb_font_data[0], sizeof(emb_font_data), TRUE);

F_THEME:
  ImageWidth = NewImage->Width;
  //DBG("ImageWidth=%d\n", ImageWidth);
  ImageHeight = NewImage->Height;
  //DBG("ImageHeight=%d\n", ImageHeight);
  PixelPtr = NewImage->PixelData;
  DBG("Font loaded: ImageWidth=%d ImageHeight=%d\n", ImageWidth, ImageHeight);
  NewFontImage = egCreateImage(ImageWidth * Rows, ImageHeight / Rows, TRUE);

  if (NewFontImage == NULL) {
    DBG("Can't create new font image!\n");
    return NULL;
  }

  FontWidth = ImageWidth / Cols;
  FontHeight = ImageHeight / Rows;
  FirstPixel = *PixelPtr;
  for (y = 0; y < Rows; y++) {
    for (j = 0; j < FontHeight; j++) {
      Ypos = ((j * Rows) + y) * ImageWidth;
      for (x = 0; x < ImageWidth; x++) {
       if (//WantAlpha &&
           (PixelPtr->b == FirstPixel. &&
           (PixelPtr->g == FirstPixel.g) &&
           (PixelPtr->r == FirstPixel.r)
           ) {
          PixelPtr->a = 0;
        }
        NewFontImage->PixelData[Ypos + x] = *PixelPtr++;
      }
    }
  }

  egFreeImage(NewImage);

  return NewFontImage;
}

VOID PrepareFont() {
  EG_PIXEL    *p;
  INTN         Width, Height;

  if (gLanguage == korean) {
    FontImage = egLoadFontImage(10, 28);
    if (FontImage) {
      FontHeight = 16;
      GlobalConfig.CharWidth = 20;
      FontWidth = GlobalConfig.CharWidth;
      TextHeight = FontHeight + TEXT_YMARGIN * 2;
      DBG("Using Korean font matrix\n");
      return;
    } else {
      DBG("font image not loaded, use english\n");
      gLanguage = english;
    }
  }

  // load the font
  if (FontImage == NULL){
    DBG("load font image type %d\n", GlobalConfig.Font);
    FontImage = egLoadFontImage(16, 16);
  }

  if (FontImage) {
    if (GlobalConfig.Font == FONT_GRAY) {
      //invert the font. embedded is dark
      p = FontImage->PixelData;
      for (Height = 0; Height < FontImage->Height; Height++){
        for (Width = 0; Width < FontImage->Width; Width++, p++){
          p->b ^= 0xFF;
          p->g ^= 0xFF;
          p->r ^= 0xFF;
          //p->a = 0xFF;    //huh!
        }
      }
    }

    TextHeight = FontHeight + TEXT_YMARGIN * 2;
    DBG("Font %d prepared WxH=%dx%d CharWidth=%d\n", GlobalConfig.Font, FontWidth, FontHeight, GlobalConfig.CharWidth);
  } else {
    DBG("Failed to load font\n");
  }
}

 

 

 

i can get GUI now with lang "ko"

here is clover log.

 

but i wonder difference of font between r3728 and r3696

r3696

post-980913-0-45444800-1472433080_thumb.png

post-980913-0-78143100-1472433091_thumb.png

 

r3728

post-980913-0-45587900-1472431581_thumb.png

post-980913-0-12758100-1472433101_thumb.png

 

add. i checked metal theme has koreanfont.png. But there are no exist any font files in  EFI/CLOVER/FONTS. example koreanfont.png, etc.. so if i use bootcamp theme with lang "ko", it causes problem of GUI.

thus your code solved this issue above.

 

thanks

Link to comment
Share on other sites

×
×
  • Create New...