#pragma once #include #include "Display.h" #include namespace Platform { class FBDisplay : public IDisplay { private: int fb_fd = -1; uint8_t* fb_mem = nullptr; size_t fb_size = 0; fb_var_screeninfo vinfo; fb_fix_screeninfo finfo; int width = 0; int height = 0; uint32_t convert_pixel(uint32_t rgba) const; public: bool init(int w, int h) override; void present(const Core::FrameBuffer* framebuffer) override; void poll_events(bool& should_quit) override; void shutdown() override; }; }