#pragma once #ifdef SDL2_BUILD #include #include "pico/types.h" class SDLDisplay { public: SDLDisplay(); ~SDLDisplay(); // bool init_display(); // When returning false, please quit the program (return from main) bool update_display(const uint8_t* oled_screen); bool process_input(); bool get_datetime(datetime_t* t); private: SDL_Window* m_window = nullptr; SDL_Renderer* m_renderer = nullptr; SDL_Surface* m_surface = nullptr; SDL_Texture* m_texture = nullptr; bool m_should_quit = false; bool m_testbool = false; // Convert the surface's pixels from the internal SSOLED display representation // to a valid representation that can be correctly displayed void convert_display(const uint8_t* oled_screen); // Get the gpio button that corresponds to the key that has been pressed uint get_button(SDL_Keycode key); }; #endif