diff --git a/src/geometry.c b/src/geometry.c index 2d97718c..19dcc306 100644 --- a/src/geometry.c +++ b/src/geometry.c @@ -453,6 +453,10 @@ void geometry_get_fb_params(capture_info_t *capinfo) { } } + if (get_true_vdisplay() <= 288) { + capinfo->sizex2 &= SIZEX2_DOUBLE_WIDTH; //inhibit double height when using 288 or 240 pixel modes + } + int geometry_h_offset = geometry->h_offset; int geometry_v_offset = geometry->v_offset; int geometry_min_h_width = geometry->min_h_width; @@ -908,12 +912,11 @@ void geometry_get_fb_params(capture_info_t *capinfo) { if (get_startup_overscan() != 0) { //for 16bpp modes reduce the screen area to the actual capture size and make up the rest with overscan on Pi zero due to bandwidth issues int apparent_width = get_hdisplay(); int apparent_height = get_vdisplay(); - int actual_v_size = (*PIXELVALVE2_VERTB) & 0xFFFF; double_width = (capinfo->sizex2 & SIZEX2_DOUBLE_WIDTH) >> 1; double_height = capinfo->sizex2 & SIZEX2_DOUBLE_HEIGHT; hscale >>= double_width; //if (_get_hardware_id() == _RPI && !uneven && (capinfo->bpp == 16 || (capinfo->bpp != 16 && capinfo->nlines > 288))) { - if (_get_hardware_id() == _RPI && capinfo->bpp == 16 && !uneven && actual_v_size > 288) { + if (_get_hardware_id() == _RPI && capinfo->bpp == 16 && !uneven && get_true_vdisplay() > 288) { if (get_gscaling() == GSCALING_INTEGER) { int actual_width = (capinfo->chars_per_line << 3); int actual_height = capinfo->nlines; diff --git a/src/osd.c b/src/osd.c index 02316330..6d16225f 100644 --- a/src/osd.c +++ b/src/osd.c @@ -7557,6 +7557,11 @@ void osd_update(uint32_t *osd_base, int bytes_per_line, int relocate) { } } + if (get_true_vdisplay() <= 288) { + osd_base += ((capinfo->nlines * 2 / 100) * bytes_per_line); + osd_base += ((capinfo->chars_per_line * 5 / 100) << 2); + } + // SAA5050 character data is 12x20 int bufferCharWidth = (capinfo->chars_per_line << 3) / 12; // SAA5050 character data is 12x20 uint32_t *line_ptr = osd_base; @@ -7783,6 +7788,12 @@ void __attribute__ ((aligned (64))) osd_update_fast(uint32_t *osd_base, int byte if (capinfo->bpp == 16 && capinfo->video_type == VIDEO_INTERLACED && (capinfo->detected_sync_type & SYNC_BIT_INTERLACED) && get_parameter(F_NORMAL_DEINTERLACE) == DEINTERLACE_NONE) { clear_screen(); } + + if (get_true_vdisplay() <= 288) { + osd_base += ((capinfo->nlines * 2 / 100) * bytes_per_line); + osd_base += ((capinfo->chars_per_line * 5 / 100) << 2); + } + // SAA5050 character data is 12x20 int bufferCharWidth = (capinfo->chars_per_line << 3) / 12; // SAA5050 character data is 12x20 uint32_t *line_ptr = osd_base;