diff --git a/Core/Driver/DriverAPI.cpp b/Core/Driver/DriverAPI.cpp index 8ba7186..cf432d1 100644 --- a/Core/Driver/DriverAPI.cpp +++ b/Core/Driver/DriverAPI.cpp @@ -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, + }, }; diff --git a/DAPI.hpp b/DAPI.hpp index 85905a4..d206f40 100644 --- a/DAPI.hpp +++ b/DAPI.hpp @@ -95,6 +95,12 @@ struct KernelAPI } Disk; } Command; + struct KAPIDisplay + { + unsigned int (*GetWidth)(void); + unsigned int (*GetHeight)(void); + /* TODO: Add more */ + } Display; } __attribute__((packed)); enum CallbackReason