]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Support for old vertical size screenshots (without chipset-dependant possible extra...
authorToni Wilen <twilen@winuae.net>
Sat, 6 Nov 2021 17:48:30 +0000 (19:48 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 6 Nov 2021 17:48:30 +0000 (19:48 +0200)
drawing.cpp
include/drawing.h
od-win32/rp.cpp
od-win32/win32_scaler.cpp

index 706de627a0c8c803d0ae6d061e9a64743a71c18a..2bb46c0884f00783ad53a3f2cf337ac47c174afd 100644 (file)
@@ -546,14 +546,20 @@ static void set_vblanking_limits(void)
        }
 }
 
-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);
index b6cb91acbaee75eabd12f9e72b21a66aed1f69a4..ed96815f245f0934cd6307bda2f29b7808e9a840 100644 (file)
@@ -375,7 +375,7 @@ extern void putpixel (uae_u8 *buf, uae_u8 *genlockbuf, int bpp, int x, xcolnr c8
 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.  */
 
index dcd9d73db2bb8fb0e8ca99db1e284653c540e27d..1dd20a022e9fb7f7792b762f30713d87bc2ea39d 100644 (file)
@@ -1307,7 +1307,7 @@ static int screencap(LPCVOID pData, struct AmigaMonitor *mon)
                        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);
index 0f3aa35fb238f21b57e692dea99342b197cf2a9d..fe466afe4482bf032d3e49e117515c6556fe8758 100644 (file)
@@ -804,7 +804,7 @@ uae_u8 *getfilterbuffer(int monid, int *widthp, int *heightp, int *pitch, int *d
        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;