}
}
-int get_vertical_visible_height(void)
+int get_vertical_visible_height(bool useoldsize)
{
struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
int h = vidinfo->drawbuffer.inheight;
int vbstrt, vbstop;
if (programmedmode <= 1) {
- h = (maxvpos_display + maxvpos_display_vsync - minfirstline) << currprefs.gfx_vresolution;
+ h = maxvpos_display + maxvpos_display_vsync - minfirstline;
+ if (useoldsize) {
+ if (h == 288 || h == 243) {
+ h--;
+ }
+ }
+ h <<= currprefs.gfx_vresolution;
}
if (interlace_seen && currprefs.gfx_vresolution > 0) {
h -= 1 << (currprefs.gfx_vresolution - 1);
extern void allocvidbuffer(int monid, struct vidbuffer *buf, int width, int height, int depth);
extern void freevidbuffer(int monid, struct vidbuffer *buf);
extern void check_prefs_picasso(void);
-extern int get_vertical_visible_height(void);
+extern int get_vertical_visible_height(bool);
/* Finally, stuff that shouldn't really be shared. */
struct vidbuf_description *avidinfo = &adisplays[0].gfxvidinfo;
struct vidbuffer vb;
int w = avidinfo->drawbuffer.inwidth;
- int h = get_vertical_visible_height();
+ int h = get_vertical_visible_height(true);
allocvidbuffer(0, &vb, w, h, avidinfo->drawbuffer.pixbytes * 8);
set_custom_limits(0, 0, 0, 0);
draw_frame(&vb);
h = vb->outheight;
if (!monid) {
// if native screen: do not include vertical blank
- h = get_vertical_visible_height();
+ h = get_vertical_visible_height(false);
}
if (pitch)
*pitch = vb->rowbytes;