Fix incorrect color format in x11 cursor (bgr instead of rgb)

This commit is contained in:
dec05eba
2024-11-09 02:45:16 +01:00
parent e647d0c4bc
commit f1b4979365
11 changed files with 27 additions and 55 deletions

View File

@@ -434,7 +434,7 @@ static int gsr_capture_nvfbc_capture(gsr_capture *cap, AVFrame *frame, gsr_color
gsr_color_conversion_draw(color_conversion, self->setup_params.dwTextures[grab_params.dwTextureIndex],
target_pos, (vec2i){output_size.x, output_size.y},
(vec2i){0, 0}, frame_size,
0.0f, false);
0.0f, false, GSR_SOURCE_COLOR_BGR);
self->params.egl->glFlush();
self->params.egl->glFinish();
@@ -442,11 +442,6 @@ static int gsr_capture_nvfbc_capture(gsr_capture *cap, AVFrame *frame, gsr_color
return 0;
}
static gsr_source_color gsr_capture_nvfbc_get_source_color(gsr_capture *cap) {
(void)cap;
return GSR_SOURCE_COLOR_BGR;
}
static void gsr_capture_nvfbc_destroy(gsr_capture *cap, AVCodecContext *video_codec_context) {
(void)video_codec_context;
gsr_capture_nvfbc *self = cap->priv;
@@ -492,7 +487,6 @@ gsr_capture* gsr_capture_nvfbc_create(const gsr_capture_nvfbc_params *params) {
.tick = NULL,
.should_stop = NULL,
.capture = gsr_capture_nvfbc_capture,
.get_source_color = gsr_capture_nvfbc_get_source_color,
.uses_external_image = NULL,
.destroy = gsr_capture_nvfbc_destroy,
.priv = cap_nvfbc