blob: a48e524c3eaf0006ce4d8a3b2b70ac55dfaf86d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/*
* ========================================================
*
* NetBoot
* Copyright (C) 2024, Theater Quality Inc, all rights reserved., all rights reserved.
*
* ========================================================
*/
#include <BootKit/BootKit.h>
#include <Mod/GfxMgr/FBMgr.h>
#include <Mod/GfxMgr/TextMgr.h>
#include <FirmwareKit/EFI.h>
#include <FirmwareKit/EFI/API.h>
#include <FirmwareKit/Handover.h>
#include <KernelKit/MSDOS.h>
#include <KernelKit/PE.h>
#include <KernelKit/PEF.h>
#include <NewKit/Macros.h>
#include <NewKit/Ref.h>
#include <BootKit/Thread.h>
#include <Mod/GfxMgr/FBMgr.h>
EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* Handover)
{
EfiSystemTable* system_table = (EfiSystemTable*)Handover->f_FirmwareCustomTables[1];
EfiInputKey key{};
system_table->ConIn->ReadKeyStroke(system_table->ConIn, &key);
if (key.UnicodeChar == 'F' ||
key.UnicodeChar == 'f')
{
UI::ui_draw_background();
fb_init();
FBDrawBitMapInRegion(zka_no_disk, ZKA_NO_DISK_HEIGHT, ZKA_NO_DISK_WIDTH, (kHandoverHeader->f_GOP.f_Width - ZKA_NO_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - ZKA_NO_DISK_HEIGHT) / 2);
fb_fini();
return kEfiOk;
}
return kEfiFail;
}
|