void SmartMatrix::handleForegroundDrawingCopy(void) { if (!foregroundCopyPending) return; memcpy(foregroundBitmap[foregroundRefreshBuffer], foregroundBitmap[foregroundDrawBuffer], sizeof(foregroundBitmap[0])); redrawForeground(); foregroundCopyPending = false; }
void SmartMatrix::handleForegroundDrawingCopy(void) { // check if first call or if rotation has changed. if so: correct some values required for addressing if ((currLocalWidth == 0) || (currRotation != screenConfig.rotation)) { currRotation = screenConfig.rotation; currLocalWidth = (screenConfig.rotation == 0 || screenConfig.rotation == 180) ? screenConfig.localWidth : screenConfig.localHeight; currLocalHeight = (screenConfig.rotation == 0 || screenConfig.rotation == 180) ? screenConfig.localHeight : screenConfig.localWidth; arrayYmult = currLocalWidth / 32; } if (!foregroundCopyPending) return; memcpy(foregroundBitmap[foregroundRefreshBuffer], foregroundBitmap[foregroundDrawBuffer], sizeof(foregroundBitmap[0])); redrawForeground(); foregroundCopyPending = false; }