mirror of https://github.com/acidanthera/audk.git
BaseTools: fix the bug to add PaletteSize info into AutoGen
Fix the bug to add PaletteSize info into AutoGen.c when the flag UEFI_HII_RESOURCE_SECTION is set to FALSE. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
60a5378208
commit
e148e6e962
|
@ -1695,10 +1695,11 @@ def CreateIdfFileCode(Info, AutoGenC, StringH, IdfGenCFlag, IdfGenBinBuffer):
|
|||
TempBuffer, TempPalette = BmpImageDecoder(File, Buffer, PaletteIndex, FileObj.TransParent)
|
||||
if len(TempPalette) > 1:
|
||||
PaletteIndex += 1
|
||||
PaletteBuffer += pack('H', len(TempPalette))
|
||||
PaletteBuffer += TempPalette
|
||||
NewPalette = pack('H', len(TempPalette))
|
||||
NewPalette += TempPalette
|
||||
PaletteBuffer += NewPalette
|
||||
PaletteStr = WriteLine(PaletteStr, '// %s: %s: %s' % (DecToHexStr(PaletteIndex - 1, 4), ID, DecToHexStr(PaletteIndex - 1, 4)))
|
||||
TempPaletteList = AscToHexList(TempPalette)
|
||||
TempPaletteList = AscToHexList(NewPalette)
|
||||
PaletteStr = WriteLine(PaletteStr, CreateArrayItem(TempPaletteList, 16) + '\n')
|
||||
ImageBuffer += TempBuffer
|
||||
BufferStr = WriteLine(BufferStr, '// %s: %s: %s' % (DecToHexStr(Index, 4), ID, DecToHexStr(Index, 4)))
|
||||
|
|
Loading…
Reference in New Issue