From 0ad6aeca61dd41e7142bce1b27133061fd0e713e Mon Sep 17 00:00:00 2001 From: Staacks Date: Sat, 5 Aug 2023 20:42:52 +0200 Subject: [PATCH] Limit framerate of standby screen to 30fps if in 30fps mode and make this release 1.2.0. --- firmware/main.c | 4 +++- firmware/main.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware/main.c b/firmware/main.c index d1ca541..51128e3 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -163,6 +163,7 @@ int main(void) { printf("Waiting for game.\n"); updateIncludeChroma(); + uint lastFrame = timer_hw->timerawl; while (!running) { if (isGameBoyOn()) { if (fallbackScreenType == FST_NONE || fallbackScreenType == FST_OFF) { @@ -183,8 +184,9 @@ int main(void) { startBackbufferToJPEG(false); } } - if (readyBufferIsNew) { + if (readyBufferIsNew && (!includeChroma || ((uint)(timer_hw->timerawl - lastFrame) > 33333))) { if (usbSendFrame()) { + lastFrame = timer_hw->timerawl; updateFallbackScreen(); startBackbufferToJPEG(false); } diff --git a/firmware/main.h b/firmware/main.h index 59fe7b3..8d1ea11 100644 --- a/firmware/main.h +++ b/firmware/main.h @@ -6,7 +6,7 @@ #define LED_SWITCH_PIN 1 #define LED_PIN_MASK 0x02 -#define VERSION "1.2.0-beta3" +#define VERSION "1.2.0" //On-screen display #define MODE_INFO_DURATION 100 //Duration of the mode info in frames