aboutsummaryrefslogtreecommitdiffstats
path: root/hal/api.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'hal/api.hpp')
-rw-r--r--hal/api.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/hal/api.hpp b/hal/api.hpp
index 5d0c33e..eaba324 100644
--- a/hal/api.hpp
+++ b/hal/api.hpp
@@ -3,7 +3,7 @@
#include <iostream>
#include "pico/util/datetime.h"
#include "../oled/ss_oled.h"
-
+#include "sdl2/display.hpp"
#include "../buttons.hpp"
class Api {
@@ -31,6 +31,10 @@ class Api {
ENTER_SHALLOW_SLEEP,
EXIT_SHALLOW_SLEEP // Restore perf setting
};
+#ifdef SDL2_BUILD
+ SDLDisplay m_sdl_display;
+#endif
+
void init();
// Control the display's power (on or off)
void display_power(bool mode);
@@ -44,7 +48,8 @@ class Api {
void display_draw_ellipse(int iCenterX, int iCenterY, int32_t iRadiusX, int32_t iRadiusY, uint8_t ucColor, uint8_t bFilled);
void display_write_buffer(uint8_t *pBuffer);
// Write the internal backbuffer to the display. Should be called when after all drawing calls. One call is done to avoid flickering of the display.
- void display_write_backbuffer();
+ // Retunrs true if must quit app
+ bool display_write_backbuffer();
int display_write_pixel(int x, int y, unsigned char ucColor, int bRender);
// Display a popup over the current view and wait for select button to be pressed.
// This is a blocking function and should be used only in the app's render method.