From 0a5e10134e88f6a417089555fa435999ca57a28a Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Wed, 31 Dec 2025 22:16:49 +0000 Subject: [PATCH] Miscellaneous fixes to align with badgemagic-rs It uses 48-pixel wide screens for .gifs. --- src/anim.c | 4 ++-- src/main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/anim.c b/src/anim.c index e41cefb..8e44212 100644 --- a/src/anim.c +++ b/src/anim.c @@ -107,11 +107,11 @@ int anim_render(uint16_t *fb, int index, int frame) { case 4: if (im_width > 44) { can_restart_lr = 0; - if (frame > (im_width / 44) * 16) { + if (frame > (im_width / 48) * 16) { can_restart_lr = 1; } - x = (frame / 16) * 44; + x = (frame / 16) * 48; } if (im_width - x < 44) { diff --git a/src/main.c b/src/main.c index b2263df..db105d7 100644 --- a/src/main.c +++ b/src/main.c @@ -61,8 +61,8 @@ int main_handler(void) { } subframe++; - if (subframe > 32 && flash_header_valid) { - // approximately 60fps + if (subframe > 33 && flash_header_valid) { + // approximately 30fps subframe = 0; uint16_t fb[44];