Auto-detect TFT_eSPI viewport feature
@@ -336,10 +336,9 @@ bool gslc_DrvSetClipRect(gslc_tsGui* pGui,gslc_tsRect* pRect)
// setViewport() API. Enabling this functionality provides
// greatly enhanced redraw performance when updating the
// entire page.
- //
- // NOTE: This function is only present in recent releases
- // of TFT_eSPI (>= v2.3.0)
- #if defined(DRV_DISP_TFT_ESPI_HAS_SETVIEWPORT)
+ // The setViewport() API is only available in recent versions of
+ // TFT_eSPI (v2.3.2+).
+ #if (TFT_ESPI_FEATURES & 0x0001) // Bit 0 = Viewport capability
m_disp.setViewport(pDriver->rClipRect.x,pDriver->rClipRect.y,pDriver->rClipRect.w,pDriver->rClipRect.h,false);
#endif
