From: c vw Date: Mon, 16 Dec 2019 14:59:25 +0000 (+0100) Subject: screen size workaround for Peter U. X-Git-Url: https://git.rkrishnan.org/specifications/%5B/status?a=commitdiff_plain;h=3887c49d6c1e81885bf22a1eac1c71614c17d911;p=pihpsdr.git screen size workaround for Peter U. --- diff --git a/main.c b/main.c index ded7365..1abf91b 100644 --- a/main.c +++ b/main.c @@ -223,6 +223,19 @@ fprintf(stderr,"width=%d height=%d\n", display_width, display_height); display_width=MAX_DISPLAY_WIDTH; display_height=MAX_DISPLAY_HEIGHT; full_screen=0; + } else { + // + // Some RaspPi variants report slightly too large screen sizes + // on a 7-inch screen, e.g. 848*480 while the physical resolution is 800*480 + // Therefore, as a work-around, limit window size to 800*480 + // + if (display_width > MAX_DISPLAY_WIDTH) { + display_width = MAX_DISPLAY_WIDTH; + } + if (display_height > MAX_DISPLAY_HEIGHT) { + display_height = MAX_DISPLAY_HEIGHT; + } + full_screen=1; } fprintf(stderr,"display_width=%d display_height=%d\n", display_width, display_height);