mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 17:17:16 +09:00
Move glClear and glx/eglSwapBuffers from capture backends to main
This commit is contained in:
@@ -1731,7 +1731,7 @@ static void list_supported_capture_options(gsr_egl *egl, bool wayland) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static void list_command() {
|
||||
static void info_command() {
|
||||
bool wayland = false;
|
||||
Display *dpy = XOpenDisplay(nullptr);
|
||||
if (!dpy) {
|
||||
@@ -2022,7 +2022,7 @@ int main(int argc, char **argv) {
|
||||
usage_full();
|
||||
|
||||
if(argc == 2 && strcmp(argv[1], "--info") == 0) {
|
||||
list_command();
|
||||
info_command();
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
@@ -3154,7 +3154,10 @@ int main(int argc, char **argv) {
|
||||
const int num_frames = framerate_mode == FramerateMode::CONSTANT ? std::max((int64_t)0LL, expected_frames - video_pts_counter) : 1;
|
||||
|
||||
if(num_frames > 0 && !paused) {
|
||||
egl.glClear(0);
|
||||
gsr_capture_capture(capture, video_frame, &color_conversion);
|
||||
gsr_egl_swap_buffers(&egl);
|
||||
|
||||
gsr_video_encoder_copy_textures_to_frame(video_encoder, video_frame);
|
||||
|
||||
if(hdr && !hdr_metadata_set && replay_buffer_size_secs == -1 && add_hdr_metadata_to_video_stream(capture, video_stream))
|
||||
|
||||
Reference in New Issue
Block a user