diff options
Diffstat (limited to 'Private/NewBoot/Source')
| -rw-r--r-- | Private/NewBoot/Source/Entrypoint.cxx | 19 | ||||
| -rw-r--r-- | Private/NewBoot/Source/ImageReader.cxx | 2 |
2 files changed, 19 insertions, 2 deletions
diff --git a/Private/NewBoot/Source/Entrypoint.cxx b/Private/NewBoot/Source/Entrypoint.cxx index 6a778143..ff118f8a 100644 --- a/Private/NewBoot/Source/Entrypoint.cxx +++ b/Private/NewBoot/Source/Entrypoint.cxx @@ -7,6 +7,7 @@ * ======================================================== */ +#include "EFIKit/EFI.hxx" #define __BOOTLOADER__ 1 #include <BootKit/BootKit.hxx> @@ -14,11 +15,25 @@ #include <KernelKit/PE.hpp> #include <NewKit/Ref.hpp> -// don't remove EfiGUID, it will call initializer_list! +STATIC Void DrawBackground() { + EfiGUID gopGuid = EfiGUID(EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID); + EfiGraphicsOutputProtocol* gop = nullptr; -EFI_EXTERN_C int EfiMain(EfiHandlePtr ImageHandle, + BS->LocateProtocol(&gopGuid, nullptr, (void**)&gop); + + for (int w = 0; w < gop->Mode->Info->VerticalResolution; ++w) { + for (int h = 0; h < gop->Mode->Info->HorizontalResolution; ++h) { + *((UInt32*)(gop->Mode->FrameBufferBase + + 4 * gop->Mode->Info->PixelsPerScanLine * w + 4 * h)) = + RGB(20, 20, 20); + } + } +} + +EFI_EXTERN_C Int EfiMain(EfiHandlePtr ImageHandle, EfiSystemTable* SystemTable) { InitEFI(SystemTable); + DrawBackground(); BTextWriter writer; diff --git a/Private/NewBoot/Source/ImageReader.cxx b/Private/NewBoot/Source/ImageReader.cxx index b714c21f..98e025a8 100644 --- a/Private/NewBoot/Source/ImageReader.cxx +++ b/Private/NewBoot/Source/ImageReader.cxx @@ -66,5 +66,7 @@ HCore::VoidPtr BImageReader::Fetch(SizeT &size) { /// get file catalog with mPath inside it. + this->mCached = true; + return nullptr; } |
