From 0d8014be5260b64daf3d7b3516d37a0dfafca7e1 Mon Sep 17 00:00:00 2001 From: Yan Date: Mon, 7 Oct 2024 16:43:01 +0200 Subject: [PATCH] Fix build error on macOS Fix window access typo for macOS. PR #5348 Signed-off-by: Romain Vimont --- app/src/mouse_capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/mouse_capture.c b/app/src/mouse_capture.c index ee96ae60..25345faa 100644 --- a/app/src/mouse_capture.c +++ b/app/src/mouse_capture.c @@ -92,8 +92,8 @@ sc_mouse_capture_set_active(struct sc_mouse_capture *mc, bool capture) { SDL_GetGlobalMouseState(&mouse_x, &mouse_y); int x, y, w, h; - SDL_GetWindowPosition(window, &x, &y); - SDL_GetWindowSize(window, &w, &h); + SDL_GetWindowPosition(mc->window, &x, &y); + SDL_GetWindowSize(mc->window, &w, &h); bool outside_window = mouse_x < x || mouse_x >= x + w || mouse_y < y || mouse_y >= y + h;