sdl/events: tidy up #ifdef checks
@@ -5,10 +5,18 @@ package sdl
#include "events.h"
#if !SDL_VERSION_ATLEAST(2,0,9)
+#if defined(WARN_OUTDATED)
+#pragma message("SDL_DISPLAYEVENT is not supported before SDL 2.0.9")
+#endif
+
#define SDL_DISPLAYEVENT (0x150)
#endif
#if !SDL_VERSION_ATLEAST(2,0,2)
+#if defined(WARN_OUTDATED)
+#pragma message("SDL_RENDER_TARGETS_RESET is not supported before SDL 2.0.2")
+#endif
+
#define SDL_RENDER_TARGETS_RESET (0x2000)
#endif
@@ -16,36 +24,17 @@ package sdl
#if defined(WARN_OUTDATED)
#pragma message("SDL_KEYMAPCHANGED is not supported before SDL 2.0.4")
-#endif
-
-#define SDL_KEYMAPCHANGED (0x304)
-
-
-#if defined(WARN_OUTDATED)
#pragma message("SDL_AUDIODEVICEADDED is not supported before SDL 2.0.4")
-#endif
-
-#define SDL_AUDIODEVICEADDED (0x1100)
-
-
-#if defined(WARN_OUTDATED)
#pragma message("SDL_AUDIODEVICEREMOVED is not supported before SDL 2.0.4")
-#endif
-
-#define SDL_AUDIODEVICEREMOVED (0x1101)
-
-
-#if defined(WARN_OUTDATED)
#pragma message("SDL_RENDER_DEVICE_RESET is not supported before SDL 2.0.4")
+#pragma message("SDL_AudioDeviceEvent is not supported before SDL 2.0.4")
#endif
+#define SDL_KEYMAPCHANGED (0x304)
+#define SDL_AUDIODEVICEADDED (0x1100)
+#define SDL_AUDIODEVICEREMOVED (0x1101)
#define SDL_RENDER_DEVICE_RESET (0x2001)
-
-#if defined(WARN_OUTDATED)
-#pragma message("SDL_AudioDeviceEvent is not supported before SDL 2.0.4")
-#endif
-
typedef struct SDL_AudioDeviceEvent
{
Uint32 type;
@@ -56,29 +45,21 @@ typedef struct SDL_AudioDeviceEvent
Uint8 padding2;
Uint8 padding3;
} SDL_AudioDeviceEvent;
+
#endif
#if !SDL_VERSION_ATLEAST(2,0,5)
#if defined(WARN_OUTDATED)
#pragma message("SDL_DROPTEXT is not supported before SDL 2.0.5")
-#endif
-
-#define SDL_DROPTEXT (0x1001)
-
-
-#if defined(WARN_OUTDATED)
#pragma message("SDL_DROPBEGIN is not supported before SDL 2.0.5")
-#endif
-
-#define SDL_DROPBEGIN (0x1002)
-
-
-#if defined(WARN_OUTDATED)
#pragma message("SDL_DROPCOMPLETE is not supported before SDL 2.0.5")
#endif
+#define SDL_DROPTEXT (0x1001)
+#define SDL_DROPBEGIN (0x1002)
#define SDL_DROPCOMPLETE (0x1003)
+
#endif
#if !SDL_VERSION_ATLEAST(2,0,9)
