mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
remove restriction that max_fps <= display_rate
these are advisory only to the client. display_rate seems to ignored, max_fps is acted on.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user