From 12975ae96189b456fed5e17ab8e5a9e2bc7f6e2f Mon Sep 17 00:00:00 2001 From: Dave Allie Date: Sun, 28 Dec 2025 21:29:44 +1100 Subject: [PATCH] Initialize GfxRenderer::orientation as Portrait --- lib/GfxRenderer/GfxRenderer.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/GfxRenderer/GfxRenderer.h b/lib/GfxRenderer/GfxRenderer.h index 3ba69e8..d1083a0 100644 --- a/lib/GfxRenderer/GfxRenderer.h +++ b/lib/GfxRenderer/GfxRenderer.h @@ -26,11 +26,9 @@ class GfxRenderer { static_assert(BW_BUFFER_CHUNK_SIZE * BW_BUFFER_NUM_CHUNKS == EInkDisplay::BUFFER_SIZE, "BW buffer chunking does not line up with display buffer size"); - // Orientation used for all rendering operations - Orientation orientation; - EInkDisplay& einkDisplay; RenderMode renderMode; + Orientation orientation; uint8_t* bwBufferChunks[BW_BUFFER_NUM_CHUNKS] = {nullptr}; std::map fontMap; void renderChar(const EpdFontFamily& fontFamily, uint32_t cp, int* x, const int* y, bool pixelState, @@ -39,7 +37,7 @@ class GfxRenderer { void rotateCoordinates(int x, int y, int* rotatedX, int* rotatedY) const; public: - explicit GfxRenderer(EInkDisplay& einkDisplay) : einkDisplay(einkDisplay), renderMode(BW) {} + explicit GfxRenderer(EInkDisplay& einkDisplay) : einkDisplay(einkDisplay), renderMode(BW), orientation(Portrait) {} ~GfxRenderer() = default; static constexpr int VIEWABLE_MARGIN_TOP = 9;