Improve support for private platforms (#11220)

This commit is contained in:
Caleb Cornett
2024-10-15 18:02:07 -04:00
committed by GitHub
parent 66d09a1cda
commit 9af5ffcfbe
27 changed files with 70 additions and 18 deletions

View File

@@ -229,6 +229,12 @@ typedef enum SDL_EventType
SDL_EVENT_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
SDL_EVENT_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
/* Reserved events for private platforms */
SDL_EVENT_PRIVATE0 = 0x4000,
SDL_EVENT_PRIVATE1,
SDL_EVENT_PRIVATE2,
SDL_EVENT_PRIVATE3,
/* Internal events */
SDL_EVENT_POLL_SENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */

View File

@@ -49,7 +49,11 @@
#include <SDL3/SDL_events.h>
#ifndef SDL_MAIN_HANDLED
#ifdef SDL_PLATFORM_WIN32
#if defined(SDL_PLATFORM_PRIVATE_MAIN)
/* Private platforms may have their own ideas about entry points. */
#include "SDL_main_private.h"
#elif defined(SDL_PLATFORM_WIN32)
/* On Windows SDL provides WinMain(), which parses the command line and passes
the arguments to your main function.

View File

@@ -68,7 +68,11 @@
unless the real entry point needs to be somewhere else entirely, like Android where it's in Java code */
#if (!defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD)) && !defined(SDL_MAIN_EXPORTED)
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_PRIVATE_MAIN)
/* Private platforms may have their own ideas about entry points. */
#include "SDL_main_impl_private.h"
#elif defined(SDL_PLATFORM_WINDOWS)
/* these defines/typedefs are needed for the WinMain() definition */
#ifndef WINAPI

View File

@@ -31,7 +31,9 @@
*/
/* Add any platform that doesn't build using the configure system. */
#if defined(SDL_PLATFORM_WIN32)
#if defined(SDL_PLATFORM_PRIVATE)
#include "SDL_build_config_private.h"
#elif defined(SDL_PLATFORM_WIN32)
#include "SDL_build_config_windows.h"
#elif defined(SDL_PLATFORM_WINGDK)
#include "SDL_build_config_wingdk.h"

View File

@@ -75,8 +75,10 @@
#cmakedefine HAVE_MALLOC 1
#cmakedefine HAVE_CALLOC 1
#cmakedefine HAVE_REALLOC 1
#cmakedefine HAVE_FDATASYNC 1
#cmakedefine HAVE_FREE 1
#cmakedefine HAVE_GETENV 1
#cmakedefine HAVE_GETHOSTNAME 1
#cmakedefine HAVE_SETENV 1
#cmakedefine HAVE_PUTENV 1
#cmakedefine HAVE_UNSETENV 1

View File

@@ -57,8 +57,10 @@
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FDATASYNC 1
#define HAVE_FREE 1
#define HAVE_GETENV 1
#define HAVE_GETHOSTNAME 1
#define HAVE_PUTENV 1
#define HAVE_SETENV 1
#define HAVE_UNSETENV 1

View File

@@ -60,8 +60,10 @@
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FDATASYNC 1
#define HAVE_FREE 1
#define HAVE_GETENV 1
#define HAVE_GETHOSTNAME 1
#define HAVE_SETENV 1
#define HAVE_PUTENV 1
#define HAVE_UNSETENV 1

View File

@@ -49,8 +49,10 @@
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FDATASYNC 1
#define HAVE_FREE 1
#define HAVE_GETENV 1
#define HAVE_GETHOSTNAME 1
#define HAVE_PUTENV 1
#define HAVE_SETENV 1
#define HAVE_UNSETENV 1

View File

@@ -54,8 +54,10 @@
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FDATASYNC 1
#define HAVE_FREE 1
#define HAVE_GETENV 1
#define HAVE_GETHOSTNAME 1
#define HAVE_SETENV 1
#define HAVE_PUTENV 1
#define HAVE_UNSETENV 1

View File

@@ -135,6 +135,7 @@ typedef unsigned int uintptr_t;
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FDATASYNC 1
#define HAVE_FREE 1
#define HAVE_ABS 1
#define HAVE_MEMSET 1

View File

@@ -75,6 +75,7 @@
#define HAVE_LIBC 1
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_FDATASYNC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
#define HAVE_ABS 1