From a243de8ce985b2040fd61b1ae415c657e8022826 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 22 Sep 2024 17:55:24 +0300
Subject: [PATCH] minor sync with latest SDL2.
---
include/SDL2/SDL_events.h | 8 ++++++++
sdl2.m4 | 2 +-
test/testautomation_subsystems.c | 2 ++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/SDL2/SDL_events.h b/include/SDL2/SDL_events.h
index 81fd6e41..33d6da4b 100644
--- a/include/SDL2/SDL_events.h
+++ b/include/SDL2/SDL_events.h
@@ -637,6 +637,14 @@ typedef struct SDL_SysWMEvent
/**
* General event structure
+ *
+ * The SDL_Event structure is the core of all event handling in SDL. SDL_Event
+ * is a union of all event structures used in SDL. Using it is a simple matter
+ * of knowing which event type corresponds to which union member. The table
+ * below lists these relationships.
+ *
+ * The SDL_Event structure has two uses: * Reading events from the event queue
+ * * Placing events on the event queue
*/
typedef union SDL_Event
{
diff --git a/sdl2.m4 b/sdl2.m4
index 274753b1..ca96369a 100644
--- a/sdl2.m4
+++ b/sdl2.m4
@@ -197,7 +197,7 @@ int main(int argc, char *argv[])
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means SDL was incorrectly installed"
+ echo "*** exact error that occurred. This usually means SDL was incorrectly installed"
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
echo "*** may want to edit the sdl2-config script: $SDL2_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
diff --git a/test/testautomation_subsystems.c b/test/testautomation_subsystems.c
index 15b17535..73eaca2f 100644
--- a/test/testautomation_subsystems.c
+++ b/test/testautomation_subsystems.c
@@ -100,6 +100,8 @@ static int subsystems_dependRefCountInitAllQuitByOne(void)
/* Following should init SDL_INIT_EVENTS and give it +3 ref counts. */
SDL_InitSubSystem(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
SDLTest_AssertPass("Call to SDL_InitSubSystem(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK)");
+ result = SDL_WasInit(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
+ SDLTest_AssertCheck(result == (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK), "Check result from SDL_WasInit(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK), expected: 0x%x, got: 0x%x", (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK), result);
result = SDL_WasInit(SDL_INIT_EVENTS);
SDLTest_AssertCheck(result == SDL_INIT_EVENTS, "Check result from SDL_WasInit(SDL_INIT_EVENTS), expected: 0x4000, got: 0x%x", result);