Updated driver API

This commit is contained in:
Alex
2023-03-02 02:30:25 +02:00
parent 75883030ad
commit 3ec416b215
2 changed files with 22 additions and 0 deletions

View File

@ -100,6 +100,18 @@ char *DriverPCIGetDeviceName(unsigned int VendorID, unsigned int DeviceID)
return (char *)"Unknown";
}
unsigned int DriverGetWidth()
{
/* TODO: We won't rely only on display buffers, what about graphics drivers and changing resolutions? */
return Display->GetBuffer(0)->Width;
}
unsigned int DriverGetHeight()
{
/* TODO: We won't rely only on display buffers, what about graphics drivers and changing resolutions? */
return Display->GetBuffer(0)->Height;
}
KernelAPI KernelAPITemplate = {
.Version = {
.Major = 0,
@ -137,4 +149,8 @@ KernelAPI KernelAPITemplate = {
},
},
},
.Display = {
.GetWidth = DriverGetWidth,
.GetHeight = DriverGetHeight,
},
};