From abe6d9db97e17d734b66dc3b1a1599022f5ee4a3 Mon Sep 17 00:00:00 2001
From: Caleb Cornett <[EMAIL REDACTED]>
Date: Mon, 20 Jan 2025 18:18:53 -0500
Subject: [PATCH] Automatically detect SDL_main_private.h
---
include/SDL3/SDL_main.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/SDL3/SDL_main.h b/include/SDL3/SDL_main.h
index 88813b6e8bd71..66ed481e8c9b1 100644
--- a/include/SDL3/SDL_main.h
+++ b/include/SDL3/SDL_main.h
@@ -133,6 +133,12 @@
#endif
+#if defined(__has_include)
+ #if __has_include("SDL_main_private.h") && __has_include("SDL_main_impl_private.h")
+ #define SDL_PLATFORM_PRIVATE_MAIN
+ #endif
+#endif
+
#ifndef SDL_MAIN_HANDLED
#if defined(SDL_PLATFORM_PRIVATE_MAIN)
/* Private platforms may have their own ideas about entry points. */