Commit 2d23d66a6145128a59d4335330c04a266c0365a7

Sam Lantinga 2021-11-08T16:33:50

Fixed SetWindowMouseRect return value on Windows

diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index 5215913..1448eb2 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -814,7 +814,7 @@ void WIN_UngrabKeyboard(SDL_Window *window)
     }
 }
 
-void
+int
 WIN_SetWindowMouseRect(_THIS, SDL_Window * window, SDL_Rect * rect)
 {
     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
@@ -825,6 +825,8 @@ WIN_SetWindowMouseRect(_THIS, SDL_Window * window, SDL_Rect * rect)
         SDL_zero(data->mouse_rect);
     }
     WIN_UpdateClipCursor(window);
+
+    return 0;
 }
 
 void
diff --git a/src/video/windows/SDL_windowswindow.h b/src/video/windows/SDL_windowswindow.h
index c292b82..19c6eb9 100644
--- a/src/video/windows/SDL_windowswindow.h
+++ b/src/video/windows/SDL_windowswindow.h
@@ -82,7 +82,7 @@ extern void WIN_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay
 extern int WIN_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp);
 extern void* WIN_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size);
 extern int WIN_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp);
-extern void WIN_SetWindowMouseRect(_THIS, SDL_Window * window, SDL_Rect * rect);
+extern int WIN_SetWindowMouseRect(_THIS, SDL_Window * window, SDL_Rect * rect);
 extern void WIN_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
 extern void WIN_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
 extern void WIN_DestroyWindow(_THIS, SDL_Window * window);