SDL: cocoa: Make keyboard grab function return an int

From 53896c9e4498a9ab2531e8b287326fff19d91617 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Wed, 6 Mar 2024 15:53:24 -0500
Subject: [PATCH] cocoa: Make keyboard grab function return an int

---
 src/video/cocoa/SDL_cocoakeyboard.h | 2 +-
 src/video/cocoa/SDL_cocoakeyboard.m | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoakeyboard.h b/src/video/cocoa/SDL_cocoakeyboard.h
index b1be77dc8b7bb..1314ec67d857d 100644
--- a/src/video/cocoa/SDL_cocoakeyboard.h
+++ b/src/video/cocoa/SDL_cocoakeyboard.h
@@ -31,6 +31,6 @@ extern void Cocoa_StartTextInput(SDL_VideoDevice *_this);
 extern void Cocoa_StopTextInput(SDL_VideoDevice *_this);
 extern int Cocoa_SetTextInputRect(SDL_VideoDevice *_this, const SDL_Rect *rect);
 
-extern void Cocoa_SetWindowKeyboardGrab(SDL_VideoDevice *_this, SDL_Window *window, SDL_bool grabbed);
+extern int Cocoa_SetWindowKeyboardGrab(SDL_VideoDevice *_this, SDL_Window *window, SDL_bool grabbed);
 
 #endif /* SDL_cocoakeyboard_h_ */
diff --git a/src/video/cocoa/SDL_cocoakeyboard.m b/src/video/cocoa/SDL_cocoakeyboard.m
index 04b06bf6865bc..1a7296b8263e9 100644
--- a/src/video/cocoa/SDL_cocoakeyboard.m
+++ b/src/video/cocoa/SDL_cocoakeyboard.m
@@ -467,11 +467,12 @@ void Cocoa_QuitKeyboard(SDL_VideoDevice *_this)
 extern CGSConnection _CGSDefaultConnection(void);
 extern CGError CGSSetGlobalHotKeyOperatingMode(CGSConnection connection, CGSGlobalHotKeyOperatingMode mode);
 
-void Cocoa_SetWindowKeyboardGrab(SDL_VideoDevice *_this, SDL_Window *window, SDL_bool grabbed)
+int Cocoa_SetWindowKeyboardGrab(SDL_VideoDevice *_this, SDL_Window *window, SDL_bool grabbed)
 {
 #ifdef SDL_MAC_NO_SANDBOX
     CGSSetGlobalHotKeyOperatingMode(_CGSDefaultConnection(), grabbed ? CGSGlobalHotKeyDisable : CGSGlobalHotKeyEnable);
 #endif
+    return 0;
 }
 
 #endif /* SDL_VIDEO_DRIVER_COCOA */