SDL: Fix the "redundant redeclaration" warning for `__debugbreak` when using MinGW (#14264) (7879d)

From 7879d0b7b38f35db010f14f20beca61518117f32 Mon Sep 17 00:00:00 2001
From: Roman Fomin <[EMAIL REDACTED]>
Date: Wed, 17 Jun 2026 05:58:23 +0700
Subject: [PATCH] Fix the "redundant redeclaration" warning for `__debugbreak`
 when using MinGW (#14264)

(cherry picked from commit b0a9aa3db04128c9e66f8d958e08ea23ed88a951)
---
 include/SDL3/SDL_assert.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/SDL3/SDL_assert.h b/include/SDL3/SDL_assert.h
index 6c8a47d004a72..6560d197d3872 100644
--- a/include/SDL3/SDL_assert.h
+++ b/include/SDL3/SDL_assert.h
@@ -126,10 +126,13 @@ extern "C" {
  */
 #define SDL_TriggerBreakpoint() TriggerABreakpointInAPlatformSpecificManner
 
-#elif defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER >= 1310)
+#elif defined(_MSC_VER) && _MSC_VER >= 1310
     /* Don't include intrin.h here because it contains C++ code */
     extern void __cdecl __debugbreak(void);
     #define SDL_TriggerBreakpoint() __debugbreak()
+#elif defined(__MINGW32__)
+    #include <intrin.h>
+    #define SDL_TriggerBreakpoint() __debugbreak()
 #elif defined(_MSC_VER) && defined(_M_IX86)
     #define SDL_TriggerBreakpoint() { _asm { int 0x03 }  }
 #elif SDL_HAS_BUILTIN(__builtin_debugtrap)