]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Always use temp display buffer mode when recording.
authorToni Wilen <twilen@winuae.net>
Thu, 4 Dec 2025 17:16:24 +0000 (19:16 +0200)
committerToni Wilen <twilen@winuae.net>
Thu, 4 Dec 2025 17:16:24 +0000 (19:16 +0200)
drawing.cpp
include/drawing.h
od-win32/avioutput.cpp
od-win32/screenshot.cpp
od-win32/win32_scaler.cpp

index 660ccd18b27d60715ec196f177a32d6ceaef66a2..8d41860475fa0ecef45be38e9c596129261c8da7 100644 (file)
@@ -287,6 +287,7 @@ static int resolution_count[RES_MAX + 1], lines_count;
 static int center_reset;
 static bool init_genlock_data;
 bool need_genlock_data;
+int video_recording_active;
 
 /* Lookup tables for dual playfields.  The dblpf_*1 versions are for the case
 that playfield 1 has the priority, dbplpf_*2 are used if playfield 2 has
@@ -1927,13 +1928,16 @@ static void refresh_indicator_init(void)
 
 bool drawing_can_lineoptimizations(void)
 {
-       if (currprefs.monitoremu || currprefs.cs_cd32fmv || ((currprefs.genlock || currprefs.genlock_effects) && currprefs.genlock_image) ||
+       if (currprefs.cs_cd32fmv || ((currprefs.genlock || currprefs.genlock_effects) && currprefs.genlock_image) ||
                currprefs.cs_color_burst || currprefs.gfx_grayscale || currprefs.monitoremu) {
                return false;
        }
        if ((lightpen_active && currprefs.lightpen_crosshair) || debug_dma >= 2 || debug_heatmap >= 2) {
                return false;
        }
+       if (video_recording_active) {
+               return false;
+       }
        return true;
 }
 
@@ -1958,6 +1962,9 @@ static void draw_frame_extras(struct vidbuffer *vb, int y_start, int y_end)
                        lightpen_update(vb, 1);
                }
        }
+       if (video_recording_active) {
+               denise_lock();
+       }
 }
 
 extern bool beamracer_debug;
index cc3b939d9ee7cf6a115b39e818c822688db4913d..3880cc08c99858112b26cdca092837d457925fc9 100644 (file)
@@ -24,6 +24,7 @@ extern int visible_left_border, visible_right_border;
 extern int detected_screen_resolution;
 extern int hsync_end_left_border, hdisplay_left_border, denisehtotal;
 extern int vsync_startline;
+extern int video_recording_active;
 
 #define AMIGA_WIDTH_MAX (754 / 2)
 #define AMIGA_HEIGHT_MAX_PAL (576 / 2)
index 3434ef5683b875ac179b947a276b331b3b60aabb..33dde02e78c3e8a2dfc1641f51e4903d42d15813 100644 (file)
@@ -1399,6 +1399,7 @@ static void AVIOutput_End2(bool fullrestart)
                fclose (wavfile);
                wavfile = 0;
        }
+       video_recording_active &= ~1;
 }
 
 void AVIOutput_End(void)
@@ -1603,6 +1604,7 @@ static void AVIOutput_Begin2(bool fullstart, bool immediate)
        fps_in_use = avioutput_fps;
        uae_start_thread(_T("aviworker"), AVIOutput_worker, NULL, NULL);
        write_log(_T("AVIOutput enabled: monitor=%d video=%d audio=%d path='%s'\n"), aviout_monid, avioutput_video, avioutput_audio, avioutput_filename_inuse);
+       video_recording_active |= 1;
        return;
 
 error:
index 5ec70f187230f1566894ed11cb2642d64119b215..eac426f525c4cfa351697387cf6a5d8ac079c804 100644 (file)
@@ -1235,8 +1235,10 @@ oops:
 
        recursive--;
 
-       if (failed)
+       if (failed) {
                screenshot_multi = 0;
+               video_recording_active &= ~2;
+       }
 
        return failed == 0;
 }
@@ -1251,13 +1253,16 @@ void screenshot(int monid, int mode, int doprepare)
 
        if (mode == 2) {
                screenshot_multi = 10;
+               video_recording_active |= 2;
                screenshot_prepare_multi();
        } else if (mode == 3) {
                screenshot_multi = -1;
                screenshot_prepare_multi();
+               video_recording_active &= ~2;
        } else if (mode == 4) {
                screenshot_multi = 0;
                filenumber = 0;
+               video_recording_active &= ~2;
        } else {
                screenshotf(monid, NULL, mode, doprepare, -1, NULL);
        }
index d422136c12b356a0cfa3d86491aaed859a54a4b8..a555dd26cabc63675609b3b0937dacabb7dce314 100644 (file)
@@ -789,7 +789,7 @@ void freefilterbuffer(int monid, uae_u8 *buf, bool unlock)
 {
        struct AmigaMonitor *mon = &AMonitors[monid];
        struct vidbuf_description *avidinfo = &adisplays[monid].gfxvidinfo;
-       struct vidbuffer *vb = avidinfo->outbuffer;
+       struct vidbuffer *vb = avidinfo->inbuffer;
 
        if (!vb)
                return;
@@ -802,7 +802,7 @@ uae_u8 *getfilterbuffer(int monid, int *widthp, int *heightp, int *pitch, int *d
 {
        struct AmigaMonitor *mon = &AMonitors[monid];
        struct vidbuf_description *avidinfo = &adisplays[monid].gfxvidinfo;
-       struct vidbuffer *vb = avidinfo->outbuffer;
+       struct vidbuffer *vb = avidinfo->inbuffer;
        int w, h;
 
        *widthp = 0;