From 74354dc4cf47af0d36d177366c57edb10acdd5b6 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 30 Jul 2015 12:41:23 -0700 Subject: [PATCH] win-capture: Use texture for actual source size --- plugins/win-capture/game-capture.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/win-capture/game-capture.c b/plugins/win-capture/game-capture.c index 7efc9c1fd..6e2b901f8 100644 --- a/plugins/win-capture/game-capture.c +++ b/plugins/win-capture/game-capture.c @@ -1360,13 +1360,15 @@ static void game_capture_render(void *data, gs_effect_t *effect) static uint32_t game_capture_width(void *data) { struct game_capture *gc = data; - return gc->active ? gc->global_hook_info->cx : 0; + return (gc->active && gc->texture) ? + gs_texture_get_width(gc->texture) : 0; } static uint32_t game_capture_height(void *data) { struct game_capture *gc = data; - return gc->active ? gc->global_hook_info->cy : 0; + return (gc->active && gc->texture) ? + gs_texture_get_height(gc->texture) : 0; } static const char *game_capture_name(void) -- GitLab