From 98e322b74508923a8cdcdaefa4857a175bedfc13 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 7 Aug 2023 22:55:29 -0700
Subject: [PATCH] Fixed testautomation --filter
video_getWindowBrightnessNegative
---
src/sdl2_compat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index d3edc8f..ba41c4e 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -2249,6 +2249,9 @@ SDL_SetWindowBrightness(SDL_Window *window, float brightness)
DECLSPEC float SDLCALL
SDL_GetWindowBrightness(SDL_Window *window)
{
+ if (!window) {
+ SDL_SetError("Invalid window");
+ }
return 1.0f;
}