Make native honor HAS_SCREEN 0 (#3509)

This allows easier building of the native target without the LovyanGFX libraries.
This commit is contained in:
Jonathan Bennett 2024-03-29 00:03:19 -05:00 committed by GitHub
parent 7b391d1a9f
commit 64fd866494
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -333,7 +333,7 @@ static LGFX *tft = nullptr;
#include <TFT_eSPI.h> // Graphics and font library for ILI9341 driver chip
static TFT_eSPI *tft = nullptr; // Invoke library, pins defined in User_Setup.h
#elif ARCH_PORTDUINO
#elif ARCH_PORTDUINO && HAS_SCREEN != 0
#include <LovyanGFX.hpp> // Graphics and font library for ST7735 driver chip
class LGFX : public lgfx::LGFX_Device
@ -404,7 +404,8 @@ class LGFX : public lgfx::LGFX_Device
static LGFX *tft = nullptr;
#endif
#if defined(ST7735_CS) || defined(ST7789_CS) || defined(ILI9341_DRIVER) || defined(RAK14014) || ARCH_PORTDUINO
#if defined(ST7735_CS) || defined(ST7789_CS) || defined(ILI9341_DRIVER) || defined(RAK14014) || \
(ARCH_PORTDUINO && HAS_SCREEN != 0)
#include "SPILock.h"
#include "TFTDisplay.h"
#include <SPI.h>