From c50b384e933f953d6d9a9bfc793185203c0c2f44 Mon Sep 17 00:00:00 2001 From: fduncanh Date: Thu, 12 Aug 2021 12:37:54 -0400 Subject: [PATCH] remove restriction that max_fps <= display_rate these are advisory only to the client. display_rate seems to ignored, max_fps is acted on. --- lib/raop.c | 2 -- uxplay.cpp | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/raop.c b/lib/raop.c index 0da3a6b..08a93c2 100755 --- a/lib/raop.c +++ b/lib/raop.c @@ -372,8 +372,6 @@ void raop_set_display(raop_t *raop, unsigned short width, unsigned short height, if (max_fps > 255) max_fps = 255; if (max_fps) raop->display_max_fps = (uint8_t) max_fps; - if (raop->display_max_fps > raop->display_refresh_rate) { - raop->display_max_fps = raop->display_refresh_rate; } } diff --git a/uxplay.cpp b/uxplay.cpp index 30309c5..db533ae 100755 --- a/uxplay.cpp +++ b/uxplay.cpp @@ -128,22 +128,21 @@ static void print_info (char *name) { printf("-v/-h Displays this help and version information\n"); } - static bool get_display_settings (char *str, unsigned short *w, unsigned short *h, unsigned short *r) { +static bool get_display_settings (char *str, unsigned short *w, unsigned short *h, unsigned short *r) { // assume str = wxh@r is valid if w and h are positive decimal integers - // with no more than 5 digits, r no more than 3 digits. + // with no more than 4 digits, r < 256 (will be stored in one byte). // first character of str is never '-' char *str1 = strchr(str,'x'); if(str1 == NULL) return false; str1[0] = '\0'; str1++; if(str1[0] == '-') return false; - if (strlen(str) > 5 || strlen(str) == 0) return false; + if (strlen(str) > 4 || strlen(str) == 0) return false; char *str2 = strchr(str1,'@'); if (str2) { str2[0] = '\0'; str2++; if (str2[0] == '-') return false; if (strlen(str2) > 3 || strlen(str2) == 0) return false; } - char *end; *w = (unsigned short) strtoul(str, &end, 10); if (*end || *w == 0) return false;