exclude double protocol

Signed-off-by: Slice <sergey.slice@gmail.com>
This commit is contained in:
Slice 2024-06-18 22:37:56 +03:00
parent ac34b36b4c
commit 2593b69c67
3 changed files with 42 additions and 40 deletions

View File

@ -419,23 +419,25 @@ SetPrivateVarProto(void)
&SMCHelperProtocol,
&gAppleSMCStateProtocolGuid,
&SMCStateProtocol,
&gAppleImageCodecProtocolGuid,
&gAppleImageCodec,
NULL
);
if (EFI_ERROR(Status)) {
DBG("Error installing multiple protocol, Status = %s\n", efiStrError(Status));
}
Status = gBS->InstallProtocolInterface (
&gImageHandle,
&gAppleImageCodecProtocolGuid,
EFI_NATIVE_INTERFACE,
(VOID *)&gAppleImageCodec
);
if (EFI_ERROR(Status)) {
DBG("AppleImageCodec: error installing protocol, Status = %s\n", efiStrError(Status));
}
//
// Status = gBS->InstallProtocolInterface (
// &gImageHandle,
// &gAppleImageCodecProtocolGuid,
// EFI_NATIVE_INTERFACE,
// (VOID *)&gAppleImageCodec
// );
//
// if (EFI_ERROR(Status)) {
// DBG("AppleImageCodec: error installing protocol, Status = %s\n", efiStrError(Status));
// }
Status = InstallAggregator();
if (EFI_ERROR(Status)) {

View File

@ -1021,7 +1021,7 @@ UINTN REFIT_MENU_SCREEN::RunGenericMenu(IN OUT INTN *DefaultEntryIndex, OUT REFI
break;
case SCAN_F8:
// testSVG();
// testBMP();
testBMP();
testEfires();
break;

View File

@ -210,31 +210,31 @@ APPLE_IMAGE_CODEC_PROTOCOL gAppleImageCodec = {
};
/** Driver's entry point. Installs our StartImage to detect boot loader start. */
EFI_STATUS
EFIAPI
AppleImageCodecEntrypoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
// EFI_HANDLE NewHandle;
//
// Install instance of Apple image codec protocol for
// PNG files
//
// NewHandle = NULL; // install to a new handle
// Status = gBS->InstallMultipleProtocolInterfaces(&NewHandle, &gAppleImageCodecProtocolGuid, &gAppleImageCodec, NULL);
Status = gBS->InstallProtocolInterface (
&ImageHandle,
&gAppleImageCodecProtocolGuid,
EFI_NATIVE_INTERFACE,
(VOID *)&gAppleImageCodec
);
if (EFI_ERROR(Status)) {
DBG("AppleImageCodec: error installing protocol, Status = %s\n", efiStrError(Status));
}
return Status;
}
//EFI_STATUS
//EFIAPI
//AppleImageCodecEntrypoint (
// IN EFI_HANDLE ImageHandle,
// IN EFI_SYSTEM_TABLE *SystemTable
//)
//{
// EFI_STATUS Status;
//// EFI_HANDLE NewHandle;
//
// //
// // Install instance of Apple image codec protocol for
// // PNG files
// //
//// NewHandle = NULL; // install to a new handle
//// Status = gBS->InstallMultipleProtocolInterfaces(&NewHandle, &gAppleImageCodecProtocolGuid, &gAppleImageCodec, NULL);
// Status = gBS->InstallProtocolInterface (
// &ImageHandle,
// &gAppleImageCodecProtocolGuid,
// EFI_NATIVE_INTERFACE,
// (VOID *)&gAppleImageCodec
// );
//
// if (EFI_ERROR(Status)) {
// DBG("AppleImageCodec: error installing protocol, Status = %s\n", efiStrError(Status));
// }
// return Status;
//}